Skip to content

Commit

Permalink
edit plugin to run on 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lsena committed May 31, 2021
1 parent cfe79c6 commit a6b2ae0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 7.10.1.1
version = 6.6.0.1

pluginName = fastfilter-elasticsearch-plugin
pluginClassname = org.elasticsearch.lsena.fastfilter.FastFilterPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@
import org.elasticsearch.script.FilterScript.LeafFactory;
import org.elasticsearch.script.ScriptContext;
import org.elasticsearch.script.ScriptEngine;
import org.elasticsearch.script.ScriptFactory;
import org.elasticsearch.search.lookup.SearchLookup;
import org.elasticsearch.index.fielddata.ScriptDocValues;

import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.Set;

import java.util.Base64;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -90,20 +88,7 @@ public void close() {
// optionally close resources
}

@Override
public Set<ScriptContext<?>> getSupportedContexts() {
return this.getSupportedContexts();
//return Set.of(ScoreScript.CONTEXT);
}

private static class FastFilterFactory implements FilterScript.Factory,
ScriptFactory {
@Override
public boolean isResultDeterministic() {
// FastFilterLeafFactory only uses deterministic APIs, this
// implies the results are cacheable.
return true;
}
private static class FastFilterFactory implements FilterScript.Factory {

@Override
public LeafFactory newFactory(
Expand Down

0 comments on commit a6b2ae0

Please sign in to comment.