Skip to content

Commit 48f2363

Browse files
committed
Use //norelease comments for temporary methods that will be removed once we move to parsing search requests on the coordinating node
1 parent 580ef6f commit 48f2363

10 files changed

+14
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
7070

7171
/**
7272
* Temporary default implementation for toFilter that parses the filter using its filter parser
73-
* Will be removed once all filters override toFilter with their own specific implementation.
7473
*/
74+
//norelease to be removed once all filter builders override toFilter providing their own specific implementation.
7575
@Override
7676
public Filter toFilter(QueryParseContext parseContext) throws IOException {
7777
return parseContext.indexQueryParserService().filterParser(parserName()).parse(parseContext);
7878
}
7979

8080
/**
8181
* Temporary method that allows to retrieve the parser for each filter.
82-
* Won't be needed anymore once all filter builders properly implement {@link #toFilter(QueryParseContext)}
8382
* @return the name of the parser class the default {@link #toFilter(QueryParseContext)} method delegates to
8483
*/
84+
//norelease to be removed once all filter builders override toFilter providing their own specific implementation.
8585
protected abstract String parserName();
8686
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
import java.io.IOException;
2525

2626
/**
27-
* Class used during the filter parsers refactoring.
27+
* Class used during the filter parsers refactoring. Will be removed once we can parse search requests on the coordinating node.
2828
* All filter parsers that have a refactored "fromXContent" method can be changed to extend this instead of {@link BaseFilterParserTemp}.
2929
* Keeps old {@link FilterParser#parse(QueryParseContext)} method as a stub delegating to
3030
* {@link FilterParser#fromXContent(QueryParseContext)} and {@link FilterBuilder#toFilter(QueryParseContext)}}
3131
*/
32+
//norelease needs to be removed once we parse search requests on the coordinating node, as the parse method is not needed anymore at that point.
3233
public abstract class BaseFilterParser implements FilterParser {
3334

3435
@Override

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
* This class with method impl is an intermediate step in the filter parsers refactoring.
2828
* Provides a fromXContent default implementation for filter parsers that don't have yet a
2929
* specific fromXContent implementation that returns a FilterBuilder.
30-
* To be removed once all filters are moved over to extend {@link BaseFilterParser}.
3130
*/
31+
//norelease to be removed once all filters are moved over to extend BaseFilterParser
3232
public abstract class BaseFilterParserTemp implements FilterParser {
3333

3434
@Override

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
7171

7272
/**
7373
* Temporary default implementation for toQuery that parses the query using its query parser
74-
* Will be removed once all queries override toQuery with their own specific implementation.
7574
*/
75+
//norelease to be removed once all query builders override toQuery providing their own specific implementation.
7676
public Query toQuery(QueryParseContext parseContext) throws QueryParsingException, IOException {
7777
return parseContext.indexQueryParserService().queryParser(parserName()).parse(parseContext);
7878
}
7979

8080
/**
8181
* Temporary method that allows to retrieve the parser for each query.
82-
* Won't be needed anymore once all query builders properly implement {@link #toQuery(QueryParseContext)}
8382
* @return the name of the parser class the default {@link #toQuery(QueryParseContext)} method delegates to
8483
*/
84+
//norelease to be removed once all query builders override toQuery providing their own specific implementation.
8585
protected abstract String parserName();
8686

8787
protected abstract void doXContent(XContentBuilder builder, Params params) throws IOException;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
import java.io.IOException;
2525

2626
/**
27-
* Class used during the query parsers refactoring.
27+
* Class used during the query parsers refactoring. Will be removed once we can parse search requests on the coordinating node.
2828
* All query parsers that have a refactored "fromXContent" method can be changed to extend this instead of {@link BaseQueryParserTemp}.
2929
* Keeps old {@link QueryParser#parse(QueryParseContext)} method as a stub delegating to
3030
* {@link QueryParser#fromXContent(QueryParseContext)} and {@link QueryBuilder#toQuery(QueryParseContext)}}
3131
*/
32+
//norelease needs to be removed once we parse search requests on the coordinating node, as the parse method is not needed anymore at that point.
3233
public abstract class BaseQueryParser implements QueryParser {
3334

3435
@Override

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
* This class with method impl is an intermediate step in the query parsers refactoring.
2828
* Provides a fromXContent default implementation for query parsers that don't have yet a
2929
* specific fromXContent implementation that returns a QueryBuilder.
30-
* To be removed once all filters are moved over to extend {@link BaseQueryParser}.
3130
*/
31+
//norelease to be removed once all queries are moved over to extend BaseQueryParser
3232
public abstract class BaseQueryParserTemp implements QueryParser {
3333

3434
@Override

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
import java.io.IOException;
2626

27-
/**
28-
*
29-
*/
3027
public interface FilterParser {
3128

3229
/**
@@ -43,6 +40,7 @@ public interface FilterParser {
4340
* it exists within a must clause or a must_not bool clause (that is why returning MATCH_ALL will
4441
* not be good, since it will not match anything when returned within a must_not clause).
4542
*/
43+
//norelease can be removed in favour of fromXContent once search requests can be parsed on the coordinating node
4644
@Nullable
4745
Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException;
4846

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
/**
2828
* FilterBuilder implementation that holds a lucene filter, which can be returned by {@link #toFilter(QueryParseContext)}.
2929
* Doesn't support conversion to {@link org.elasticsearch.common.xcontent.XContent} via {@link #doXContent(XContentBuilder, Params)}.
30-
* Will be removed once all filters support separate fromXContent and toFilter methods.
3130
*/
31+
//norelease to be removed once all queries support separate fromXContent and toQuery methods
3232
public class FilterWrappingFilterBuilder extends BaseFilterBuilder {
3333

3434
private final Filter filter;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public interface QueryParser {
4242
* Returns <tt>null</tt> if this query should be ignored in the context of
4343
* the DSL.
4444
*/
45+
//norelease can be removed in favour of fromXContent once search requests can be parsed on the coordinating node
4546
@Nullable
4647
Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException;
4748

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
/**
2828
* QueryBuilder implementation that holds a lucene query, which can be returned by {@link #toQuery(QueryParseContext)}.
2929
* Doesn't support conversion to {@link org.elasticsearch.common.xcontent.XContent} via {@link #doXContent(XContentBuilder, Params)}.
30-
* Will be removed once all queries support separate fromXContent and toQuery methods.
3130
*/
31+
//norelease to be removed once all queries support separate fromXContent and toQuery methods
3232
public class QueryWrappingQueryBuilder extends BaseQueryBuilder {
3333

3434
private Query query;

0 commit comments

Comments
 (0)