parent
9e67cca987
commit
20e8005859
|
@ -806,7 +806,8 @@ public class QueryStringQueryBuilderTests extends AbstractQueryTestCase<QueryStr
|
||||||
QueryStringQueryBuilder queryBuilder = new QueryStringQueryBuilder(STRING_FIELD_NAME + ":*");
|
QueryStringQueryBuilder queryBuilder = new QueryStringQueryBuilder(STRING_FIELD_NAME + ":*");
|
||||||
Query query = queryBuilder.toQuery(context);
|
Query query = queryBuilder.toQuery(context);
|
||||||
if (getCurrentTypes().length > 0) {
|
if (getCurrentTypes().length > 0) {
|
||||||
if (context.getIndexSettings().getIndexVersionCreated().onOrAfter(Version.V_6_1_0)) {
|
if (context.getIndexSettings().getIndexVersionCreated().onOrAfter(Version.V_6_1_0)
|
||||||
|
&& (context.fieldMapper(STRING_FIELD_NAME).omitNorms() == false)) {
|
||||||
assertThat(query, equalTo(new ConstantScoreQuery(new NormsFieldExistsQuery(STRING_FIELD_NAME))));
|
assertThat(query, equalTo(new ConstantScoreQuery(new NormsFieldExistsQuery(STRING_FIELD_NAME))));
|
||||||
} else {
|
} else {
|
||||||
assertThat(query, equalTo(new ConstantScoreQuery(new TermQuery(new Term("_field_names", STRING_FIELD_NAME)))));
|
assertThat(query, equalTo(new ConstantScoreQuery(new TermQuery(new Term("_field_names", STRING_FIELD_NAME)))));
|
||||||
|
|
Loading…
Reference in New Issue