mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Fix MatchPhrasePrefixQueryBuilderTests#testPhraseOnFieldWithNoTerms
The test cannot run when no type is registered. Relates #30450
This commit is contained in:
parent
5e48ba7cbd
commit
990442fdb7
@ -119,6 +119,7 @@ public class MatchPhrasePrefixQueryBuilderTests extends AbstractQueryTestCase<Ma
|
||||
}
|
||||
|
||||
public void testPhraseOnFieldWithNoTerms() {
|
||||
assumeTrue("test runs only when at least a type is registered", getCurrentTypes().length > 0);
|
||||
MatchPhrasePrefixQueryBuilder matchQuery = new MatchPhrasePrefixQueryBuilder(DATE_FIELD_NAME, "three term phrase");
|
||||
matchQuery.analyzer("whitespace");
|
||||
expectThrows(IllegalArgumentException.class, () -> matchQuery.doToQuery(createShardContext()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user