|
42 | 42 | import org.apache.lucene.search.WildcardQuery;
|
43 | 43 | import org.apache.lucene.search.spans.SpanNearQuery;
|
44 | 44 | import org.apache.lucene.search.spans.SpanOrQuery;
|
45 |
| -import org.apache.lucene.search.spans.SpanQuery; |
46 | 45 | import org.apache.lucene.search.spans.SpanTermQuery;
|
47 | 46 | import org.apache.lucene.util.BytesRef;
|
48 | 47 | import org.apache.lucene.util.automaton.TooComplexToDeterminizeException;
|
|
51 | 50 | import org.elasticsearch.cluster.metadata.IndexMetaData;
|
52 | 51 | import org.elasticsearch.common.Strings;
|
53 | 52 | import org.elasticsearch.common.compress.CompressedXContent;
|
54 |
| -import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery; |
55 | 53 | import org.elasticsearch.common.settings.Settings;
|
56 | 54 | import org.elasticsearch.common.unit.Fuzziness;
|
57 | 55 | import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
74 | 72 | import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery;
|
75 | 73 | import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBooleanSubQuery;
|
76 | 74 | import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertDisjunctionSubQuery;
|
77 |
| -import static org.hamcrest.CoreMatchers.either; |
78 | 75 | import static org.hamcrest.CoreMatchers.equalTo;
|
79 | 76 | import static org.hamcrest.Matchers.containsString;
|
80 | 77 | import static org.hamcrest.Matchers.instanceOf;
|
@@ -381,11 +378,7 @@ public QueryStringQueryBuilder mutateInstance(QueryStringQueryBuilder instance)
|
381 | 378 | @Override
|
382 | 379 | protected void doAssertLuceneQuery(QueryStringQueryBuilder queryBuilder,
|
383 | 380 | Query query, SearchContext context) throws IOException {
|
384 |
| - assertThat(query, either(instanceOf(TermQuery.class)) |
385 |
| - .or(instanceOf(BooleanQuery.class)).or(instanceOf(DisjunctionMaxQuery.class)) |
386 |
| - .or(instanceOf(PhraseQuery.class)).or(instanceOf(BoostQuery.class)) |
387 |
| - .or(instanceOf(MultiPhrasePrefixQuery.class)).or(instanceOf(PrefixQuery.class)).or(instanceOf(SpanQuery.class)) |
388 |
| - .or(instanceOf(MatchNoDocsQuery.class))); |
| 381 | + // nothing yet, put additional assertions here. |
389 | 382 | }
|
390 | 383 |
|
391 | 384 | // Tests fix for https://github.com/elastic/elasticsearch/issues/29403
|
|
0 commit comments