Fix compile errors in src/test.

Original commit: elastic/x-pack-elasticsearch@2ab67bbbdc
This commit is contained in:
Adrien Grand 2017-07-11 14:31:35 +02:00
parent 82499b6e55
commit 2e7c725d03
1 changed files with 3 additions and 3 deletions

View File

@ -12,8 +12,8 @@ import org.apache.lucene.search.AssertingQuery;
import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.DisjunctionMaxQuery; import org.apache.lucene.search.DisjunctionMaxQuery;
import org.apache.lucene.search.DocValuesFieldExistsQuery;
import org.apache.lucene.search.DocValuesNumbersQuery; import org.apache.lucene.search.DocValuesNumbersQuery;
import org.apache.lucene.search.FieldValueQuery;
import org.apache.lucene.search.IndexOrDocValuesQuery; import org.apache.lucene.search.IndexOrDocValuesQuery;
import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.MatchNoDocsQuery; import org.apache.lucene.search.MatchNoDocsQuery;
@ -103,7 +103,7 @@ public class FieldExtractorTests extends ESTestCase {
public void testFieldValue() { public void testFieldValue() {
Set<String> fields = new HashSet<>(); Set<String> fields = new HashSet<>();
FieldExtractor.extractFields(new FieldValueQuery("foo"), fields); FieldExtractor.extractFields(new DocValuesFieldExistsQuery("foo"), fields);
assertEquals(asSet("foo"), fields); assertEquals(asSet("foo"), fields);
} }
@ -135,7 +135,7 @@ public class FieldExtractorTests extends ESTestCase {
public void testIndexOrDocValuesQuery() { public void testIndexOrDocValuesQuery() {
Set<String> fields = new HashSet<>(); Set<String> fields = new HashSet<>();
Query supported = IntPoint.newExactQuery("foo", 42); Query supported = IntPoint.newExactQuery("foo", 42);
Query unsupported = NumericDocValuesField.newExactQuery("bar", 3); Query unsupported = NumericDocValuesField.newSlowExactQuery("bar", 3);
IndexOrDocValuesQuery query = new IndexOrDocValuesQuery(supported, supported); IndexOrDocValuesQuery query = new IndexOrDocValuesQuery(supported, supported);
FieldExtractor.extractFields(query, fields); FieldExtractor.extractFields(query, fields);