Skip to content

Commit 17ddc08

Browse files
committed
filtered query parses _name incorrectly
fixes #4960
1 parent 5d0ee26 commit 17ddc08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/elasticsearch/index/query/FilteredQueryParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ public Query parse(QueryParseContext parseContext) throws IOException, QueryPars
9494
filterStrategy = FilteredQuery.LEAP_FROG_QUERY_FIRST_STRATEGY;
9595
} else if ("leap_frog_filter_first".equals(value) || "leapFrogFilterFirst".equals(value)) {
9696
filterStrategy = FilteredQuery.LEAP_FROG_FILTER_FIRST_STRATEGY;
97-
} else if ("_name".equals(currentFieldName)) {
98-
queryName = parser.text();
9997
} else {
10098
throw new QueryParsingException(parseContext.index(), "[filtered] strategy value not supported [" + value + "]");
10199
}
100+
} else if ("_name".equals(currentFieldName)) {
101+
queryName = parser.text();
102102
} else if ("boost".equals(currentFieldName)) {
103103
boost = parser.floatValue();
104104
} else if ("_cache".equals(currentFieldName)) {

0 commit comments

Comments
 (0)