Skip to content

Commit

Permalink
Es7 9 (#325)
Browse files Browse the repository at this point in the history
* wip

* add plugin ref and adjust class name
  • Loading branch information
nathancday authored Aug 24, 2020
1 parent aa94fa1 commit e6a2877
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
ltrVersion = 1.3.1

# Dependencies versions
elasticsearchVersion = 7.8.1
luceneVersion = 8.5.1
elasticsearchVersion = 7.9.0
luceneVersion = 8.6.0
ow2Version = 7.2
antlrVersion=4.5.1-1
ow2Version=7.2
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void nextDoc(SearchHit hit) {
DocumentField logs = hit.getFields().get(FIELD_NAME);
if (logs == null) {
logs = newLogField();
hit.setField(FIELD_NAME, logs);
hit.setDocumentField(FIELD_NAME, logs);
}
Map<String, List<Map<String, Object>>> entries = logs.getValue();
rebuild();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery;
import org.elasticsearch.common.text.Text;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.fielddata.plain.SortedNumericDVIndexFieldData;
import org.elasticsearch.index.fielddata.plain.SortedNumericIndexFieldData;
import org.elasticsearch.search.SearchHit;
import org.junit.AfterClass;
import org.junit.BeforeClass;
Expand Down Expand Up @@ -210,7 +210,7 @@ public RankerQuery buildQuery(String text) {

public Query buildFunctionScore() {
FieldValueFactorFunction fieldValueFactorFunction = new FieldValueFactorFunction("score", FACTOR, LN2P, 0D,
new SortedNumericDVIndexFieldData(new Index("test", "123"),
new SortedNumericIndexFieldData(new Index("test", "123"),
"score", FLOAT));
return new FunctionScoreQuery(new MatchAllDocsQuery(),
fieldValueFactorFunction, CombineFunction.MULTIPLY, 0F, Float.MAX_VALUE);
Expand Down

0 comments on commit e6a2877

Please sign in to comment.