Module org.elasticsearch.server
Class QueryRewriteInterceptor.CompositeQueryRewriteInterceptor
java.lang.Object
org.elasticsearch.plugins.internal.rewriter.QueryRewriteInterceptor.CompositeQueryRewriteInterceptor
- All Implemented Interfaces:
QueryRewriteInterceptor
- Enclosing interface:
QueryRewriteInterceptor
public static class QueryRewriteInterceptor.CompositeQueryRewriteInterceptor
extends Object
implements QueryRewriteInterceptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.plugins.internal.rewriter.QueryRewriteInterceptor
QueryRewriteInterceptor.CompositeQueryRewriteInterceptor, QueryRewriteInterceptor.NoOpQueryRewriteInterceptor -
Method Summary
Modifier and TypeMethodDescriptionName of the query to be intercepted and rewritten.interceptAndRewrite(QueryRewriteContext context, QueryBuilder queryBuilder) Intercepts and returns a rewritten query if modifications are required; otherwise, returns the same providedQueryBuilderinstance unchanged.
-
Method Details
-
getQueryName
Description copied from interface:QueryRewriteInterceptorName of the query to be intercepted and rewritten.- Specified by:
getQueryNamein interfaceQueryRewriteInterceptor
-
interceptAndRewrite
Description copied from interface:QueryRewriteInterceptorIntercepts and returns a rewritten query if modifications are required; otherwise, returns the same providedQueryBuilderinstance unchanged.- Specified by:
interceptAndRewritein interfaceQueryRewriteInterceptor- Parameters:
context- theQueryRewriteContextproviding the context for the rewrite operationqueryBuilder- the originalQueryBuilderto potentially rewrite- Returns:
- the rewritten
QueryBuilder, or the original instance if no rewrite was needed
-