Usages of

org.apache.lucene.queries.ExtendedCommonTermsQuery.isCoordDisabled()
// see #11730 public void testCommonTermsQuery4() throws IOException { boolean disableCoord = randomBoolean(); Query parsedQuery = parseQuery(commonTermsQuery("field", "text").disableCoord(disableCoord)).toQuery(createShardContext()); assertThat(parsedQuery, instanceOf(ExtendedCommonTermsQuery.class)); ExtendedCommonTermsQuery ectQuery = (ExtendedCommonTermsQuery) parsedQuery; assertThat(ectQuery.isCoordDisabled(), equalTo(disableCoord)); }
@Test // see #11730 public void testCommonTermsQuery4() throws IOException { boolean disableCoord = randomBoolean(); Query parsedQuery = parseQuery(commonTermsQuery("field", "text").disableCoord(disableCoord).buildAsBytes()).toQuery(createShardContext()); assertThat(parsedQuery, instanceOf(ExtendedCommonTermsQuery.class)); ExtendedCommonTermsQuery ectQuery = (ExtendedCommonTermsQuery) parsedQuery; assertThat(ectQuery.isCoordDisabled(), equalTo(disableCoord)); }
// see #11730 public void testCommonTermsQuery4() throws IOException { boolean disableCoord = randomBoolean(); Query parsedQuery = parseQuery(commonTermsQuery("field", "text").disableCoord(disableCoord).buildAsBytes()).toQuery(createShardContext()); assertThat(parsedQuery, instanceOf(ExtendedCommonTermsQuery.class)); ExtendedCommonTermsQuery ectQuery = (ExtendedCommonTermsQuery) parsedQuery; assertThat(ectQuery.isCoordDisabled(), equalTo(disableCoord)); }
@Test // see #11730 public void testCommonTermsQuery4() throws IOException { IndexQueryParserService queryParser = queryParser(); Query parsedQuery = queryParser.parse(commonTermsQuery("field", "text").disableCoord(false)).query(); assertThat(parsedQuery, instanceOf(ExtendedCommonTermsQuery.class)); ExtendedCommonTermsQuery ectQuery = (ExtendedCommonTermsQuery) parsedQuery; assertFalse(ectQuery.isCoordDisabled()); parsedQuery = queryParser.parse(commonTermsQuery("field", "text").disableCoord(true)).query(); assertThat(parsedQuery, instanceOf(ExtendedCommonTermsQuery.class)); ectQuery = (ExtendedCommonTermsQuery) parsedQuery; assertTrue(ectQuery.isCoordDisabled()); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes