Fix an incorrect reference to 'zero_terms_docs' in match_phrase queries.
This commit is contained in:
parent
48461ac143
commit
113d1d3eab
|
@ -227,14 +227,14 @@ public class MatchPhraseQueryBuilder extends AbstractQueryBuilder<MatchPhraseQue
|
||||||
} else if (AbstractQueryBuilder.NAME_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
|
} else if (AbstractQueryBuilder.NAME_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
|
||||||
queryName = parser.text();
|
queryName = parser.text();
|
||||||
} else if (ZERO_TERMS_QUERY_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
|
} else if (ZERO_TERMS_QUERY_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
|
||||||
String zeroTermsDocs = parser.text();
|
String zeroTermsValue = parser.text();
|
||||||
if ("none".equalsIgnoreCase(zeroTermsDocs)) {
|
if ("none".equalsIgnoreCase(zeroTermsValue)) {
|
||||||
zeroTermsQuery = ZeroTermsQuery.NONE;
|
zeroTermsQuery = ZeroTermsQuery.NONE;
|
||||||
} else if ("all".equalsIgnoreCase(zeroTermsDocs)) {
|
} else if ("all".equalsIgnoreCase(zeroTermsValue)) {
|
||||||
zeroTermsQuery = ZeroTermsQuery.ALL;
|
zeroTermsQuery = ZeroTermsQuery.ALL;
|
||||||
} else {
|
} else {
|
||||||
throw new ParsingException(parser.getTokenLocation(),
|
throw new ParsingException(parser.getTokenLocation(),
|
||||||
"Unsupported zero_terms_docs value [" + zeroTermsDocs + "]");
|
"Unsupported zero_terms_query value [" + zeroTermsValue + "]");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new ParsingException(parser.getTokenLocation(),
|
throw new ParsingException(parser.getTokenLocation(),
|
||||||
|
|
Loading…
Reference in New Issue