Skip to content

Instantly share code, notes, and snippets.

View msfroh's full-sized avatar

Michael Froh msfroh

  • Amazon Web Services
  • Seattle, WA
View GitHub Profile
public static class QueryShapeVisitor implements QueryBuilderVisitor {
private final SetOnce<String> queryType = new SetOnce<>();
private final Map<BooleanClause.Occur, List<QueryShapeVisitor>> childVisitors = new EnumMap<>(BooleanClause.Occur.class);
@Override
public void accept(QueryBuilder qb) {
queryType.set(qb.getName());
}
@Override
1. Triage: https://github.com/orgs/opensearch-project/projects/45/views/21
2. Louis's RFC https://github.com/opensearch-project/OpenSearch/issues/9200
3. Austin's SearchResponse Ext PR: https://github.com/opensearch-project/OpenSearch/pull/9379
Triage any new issues on Search Applications Vertical · GitHub
Mention: [META] Score Combination and Normalization for Semantics Search. Score Normalization for k-NN and BM25 · Issue #123 · opensearch-project/neural-search · GitHub
Mention & Discuss: [BUG] 2.9.0 Restoring snapshot with remote_snapshot fails with exception from functioning S3 repository · Issue #9125 · opensearch-project/OpenSearch · GitHub
Q&A/Other Topics
* Meta-agenda
@msfroh
msfroh / gist:5071d8be1b5408526b6fce0440fc27c0
Created February 15, 2023 19:19
Results of OpenSearch repository audit for MacOS builds
Total repo count: 96
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Repos without GitHub workflows: 10
ansible-playbook
dashboards-catalog
dashboards-desktop
dashboards-docker-images
docker-images
opensearch-benchmark-workloads
public class Grammar {
static interface Subject {
default Subject and(Subject other) { return new Subject() {}; }
// Define both talkTo and talksTo to ensure "sentences" below
// have subject-verb agreement.
default void talksTo(Obj obj) {}
default void talkTo(Obj obj) {}
}
@msfroh
msfroh / ImmutableList.java
Last active December 16, 2015 19:19
Pattern matching examples
public abstract class ImmutableList<T> {
/*
* Operations
*/
public abstract T head();
public abstract ImmutableList<T> tail();
public abstract <R> ImmutableList<R> map(Function<T, R> f);
public final ImmutableList<T> prepend(T elem) {
return new NonEmptyList<>(elem, this);
final class example.AnonymousFunction$1 implements java.util.function.Function<java.lang.Integer, java.lang.Integer> {
final java.lang.Integer val$i;
example.AnonymousFunction$1(java.lang.Integer);
public java.lang.Integer apply(java.lang.Integer);
public java.lang.Object apply(java.lang.Object);
}
@msfroh
msfroh / AugmentedIterable.java
Last active December 12, 2015 04:59
Augmented iterators for a post on my blog
public interface AugmentedIterable<T> extends Iterable<T> {
default <R> R foldLeft(R init, BiFunction<? super R, ? super T, ? extends R> f) {
R out = init;
for (T elem : this) {
out = f.apply(out, elem);
}
return out;
}
@msfroh
msfroh / DiamondTest.java
Last active December 11, 2015 19:28
Project Lambda examples for my blog
public class DiamondTest {
private interface Print {
void print();
}
private interface Hello extends Print {
default void print() {
System.out.println("Hello");
}
}