Class FilterQueryRequestProcessor
java.lang.Object
org.opensearch.search.pipeline.AbstractProcessor
org.opensearch.search.pipeline.common.FilterQueryRequestProcessor
- All Implemented Interfaces:
Processor,SearchRequestProcessor
public class FilterQueryRequestProcessor
extends AbstractProcessor
implements SearchRequestProcessor
This is a
SearchRequestProcessor that replaces the incoming query with a BooleanQuery
that MUST match the incoming query with a FILTER clause based on the configured query.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.search.pipeline.Processor
Processor.PipelineContext, Processor.PipelineSource -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns the type of the processor.processRequest(SearchRequest request) Modifies the search request by adding a filtered query to the existing query, if any, and sets it as the new query in the search request's SearchSourceBuilder.Methods inherited from class org.opensearch.search.pipeline.AbstractProcessor
getDescription, getTag, isIgnoreFailureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.search.pipeline.Processor
getDescription, getTag, isIgnoreFailureMethods inherited from interface org.opensearch.search.pipeline.SearchRequestProcessor
processRequest, processRequestAsync
-
Field Details
-
TYPE
Key to reference this processor type from a search pipeline.- See Also:
-
-
Method Details
-
getType
Returns the type of the processor. -
processRequest
Modifies the search request by adding a filtered query to the existing query, if any, and sets it as the new query in the search request's SearchSourceBuilder.- Specified by:
processRequestin interfaceSearchRequestProcessor- Parameters:
request- The search request to be processed.- Returns:
- The modified search request.
- Throws:
Exception- if an error occurs while processing the request.
-