Skip to content

Commit ce6aa25

Browse files
committed
Remove support for query_binary and filter_binary
query_binary and filter_binary are unused at this point, as we only parse on the coordinating node and the java api only holds structured java objects for queries and filters, meaning they all implement Writeable and get natively serialized. Relates to #14308 Closes #14433
1 parent 43323c3 commit ce6aa25

File tree

5 files changed

+4
-97
lines changed

5 files changed

+4
-97
lines changed

core/src/main/java/org/elasticsearch/index/query/QueryParseContext.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.elasticsearch.common.ParseField;
2323
import org.elasticsearch.common.ParseFieldMatcher;
2424
import org.elasticsearch.common.ParsingException;
25-
import org.elasticsearch.common.xcontent.XContentFactory;
2625
import org.elasticsearch.common.xcontent.XContentParser;
2726
import org.elasticsearch.indices.query.IndicesQueriesRegistry;
2827

@@ -76,17 +75,6 @@ public QueryBuilder<?> parseTopLevelQueryBuilder() {
7675
String fieldName = parser.currentName();
7776
if ("query".equals(fieldName)) {
7877
queryBuilder = parseInnerQueryBuilder();
79-
} else if ("query_binary".equals(fieldName) || "queryBinary".equals(fieldName)) {
80-
byte[] querySource = parser.binaryValue();
81-
XContentParser qSourceParser = XContentFactory.xContent(querySource).createParser(querySource);
82-
QueryParseContext queryParseContext = new QueryParseContext(indicesQueriesRegistry);
83-
queryParseContext.reset(qSourceParser);
84-
try {
85-
queryParseContext.parseFieldMatcher(parseFieldMatcher);
86-
queryBuilder = queryParseContext.parseInnerQueryBuilder();
87-
} finally {
88-
queryParseContext.reset(null);
89-
}
9078
} else {
9179
throw new ParsingException(parser.getTokenLocation(), "request does not support [" + parser.currentName() + "]");
9280
}

core/src/main/java/org/elasticsearch/search/query/FilterBinaryParseElement.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

core/src/main/java/org/elasticsearch/search/query/QueryBinaryParseElement.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

core/src/main/java/org/elasticsearch/search/query/QueryPhase.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ public QueryPhase(AggregationPhase aggregationPhase, SuggestPhase suggestPhase,
9090
parseElements.put("indices_boost", new IndicesBoostParseElement());
9191
parseElements.put("indicesBoost", new IndicesBoostParseElement());
9292
parseElements.put("query", new QueryParseElement());
93-
parseElements.put("queryBinary", new QueryBinaryParseElement());
94-
parseElements.put("query_binary", new QueryBinaryParseElement());
9593
parseElements.put("post_filter", new PostFilterParseElement());
9694
parseElements.put("postFilter", new PostFilterParseElement());
97-
parseElements.put("filterBinary", new FilterBinaryParseElement());
98-
parseElements.put("filter_binary", new FilterBinaryParseElement());
9995
parseElements.put("sort", new SortParseElement());
10096
parseElements.put("trackScores", new TrackScoresParseElement());
10197
parseElements.put("track_scores", new TrackScoresParseElement());

docs/reference/migration/migrate_3_0.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ Removed support for multiple highlighter names, the only supported ones are: `pl
117117

118118
Removed support for the deprecated top level `filter` in the search api, replaced by `post_filter`.
119119

120+
==== `query_binary` and `filter_binary` removed
121+
122+
Removed support for the undocumented `query_binary` and `filter_binary` sections of a search request.
123+
120124
=== Parent/Child changes
121125

122126
The `children` aggregation, parent child inner hits and `has_child` and `has_parent` queries will not work on indices

0 commit comments

Comments
 (0)