mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-13 00:15:47 +00:00
Fix edge case for SpanMultiTermQueryBuilderTest
This commit is contained in:
parent
83fe825eeb
commit
e11e75e3ec
@ -68,8 +68,8 @@ public class SpanMultiTermQueryBuilderTest extends BaseQueryTestCase<SpanMultiTe
|
||||
@Test
|
||||
public void testUnsupportedInnerQueryType() throws IOException {
|
||||
QueryParseContext parseContext = createContext();
|
||||
// test makes only sense if date field is mapped
|
||||
if (parseContext.fieldMapper(DATE_FIELD_NAME) != null) {
|
||||
// test makes only sense if we have at least one type registered with date field mapping
|
||||
if (getCurrentTypes().length > 0 && parseContext.fieldMapper(DATE_FIELD_NAME) != null) {
|
||||
try {
|
||||
RangeQueryBuilder query = new RangeQueryBuilder(DATE_FIELD_NAME);
|
||||
new SpanMultiTermQueryBuilder(query).toQuery(createContext());
|
||||
|
Loading…
x
Reference in New Issue
Block a user