File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
server/src/main/java/org/elasticsearch/index/query Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -507,14 +507,14 @@ public static MatchQueryBuilder fromXContent(XContentParser parser) throws IOExc
507507 } else if (CUTOFF_FREQUENCY_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
508508 cutOffFrequency = parser .floatValue ();
509509 } else if (ZERO_TERMS_QUERY_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
510- String zeroTermsDocs = parser .text ();
511- if ("none" .equalsIgnoreCase (zeroTermsDocs )) {
510+ String zeroTermsValue = parser .text ();
511+ if ("none" .equalsIgnoreCase (zeroTermsValue )) {
512512 zeroTermsQuery = MatchQuery .ZeroTermsQuery .NONE ;
513- } else if ("all" .equalsIgnoreCase (zeroTermsDocs )) {
513+ } else if ("all" .equalsIgnoreCase (zeroTermsValue )) {
514514 zeroTermsQuery = MatchQuery .ZeroTermsQuery .ALL ;
515515 } else {
516516 throw new ParsingException (parser .getTokenLocation (),
517- "Unsupported zero_terms_docs value [" + zeroTermsDocs + "]" );
517+ "Unsupported zero_terms_query value [" + zeroTermsValue + "]" );
518518 }
519519 } else if (AbstractQueryBuilder .NAME_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
520520 queryName = parser .text ();
Original file line number Diff line number Diff line change @@ -684,13 +684,14 @@ public static MultiMatchQueryBuilder fromXContent(XContentParser parser) throws
684684 } else if (LENIENT_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
685685 lenient = parser .booleanValue ();
686686 } else if (ZERO_TERMS_QUERY_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
687- String zeroTermsDocs = parser .text ();
688- if ("none" .equalsIgnoreCase (zeroTermsDocs )) {
687+ String zeroTermsValue = parser .text ();
688+ if ("none" .equalsIgnoreCase (zeroTermsValue )) {
689689 zeroTermsQuery = MatchQuery .ZeroTermsQuery .NONE ;
690- } else if ("all" .equalsIgnoreCase (zeroTermsDocs )) {
690+ } else if ("all" .equalsIgnoreCase (zeroTermsValue )) {
691691 zeroTermsQuery = MatchQuery .ZeroTermsQuery .ALL ;
692692 } else {
693- throw new ParsingException (parser .getTokenLocation (), "Unsupported zero_terms_docs value [" + zeroTermsDocs + "]" );
693+ throw new ParsingException (parser .getTokenLocation (),
694+ "Unsupported zero_terms_query value [" + zeroTermsValue + "]" );
694695 }
695696 } else if (AbstractQueryBuilder .NAME_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
696697 queryName = parser .text ();
You can’t perform that action at this time.
0 commit comments