Module org.elasticsearch.server
Class StandardRetrieverBuilder
java.lang.Object
org.elasticsearch.search.retriever.RetrieverBuilder
org.elasticsearch.search.retriever.StandardRetrieverBuilder
- All Implemented Interfaces:
Rewriteable<RetrieverBuilder>,ToXContent
A standard retriever is used to represent anything that is a query along
with some elements to specify parameters for that query.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final Stringstatic final ObjectParser<StandardRetrieverBuilder, RetrieverParserContext> static final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final NodeFeaturestatic final ParseFieldFields inherited from class org.elasticsearch.search.retriever.RetrieverBuilder
MIN_SCORE_FIELD, minScore, NAME_FIELD, PRE_FILTER_FIELD, preFilterQueryBuilders, rankDocs, retrieverName, RETRIEVERS_SUPPORTEDFields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintvoiddoToXContent(XContentBuilder builder, ToXContent.Params params) voidextractToSearchSourceBuilder(SearchSourceBuilder searchSourceBuilder, boolean compoundUsed) This method is called at the end of rewriting on behalf of aSearchSourceBuilder.static StandardRetrieverBuilderfromXContent(XContentParser parser, RetrieverParserContext context) getName()Rewrites this instance based on the provided context.This function is called by compoundRetrieverBuilderto return the original query that was used by this retriever to compute its top documents.Methods inherited from class org.elasticsearch.search.retriever.RetrieverBuilder
declareBaseParserFields, equals, explainQuery, getPreFilterQueryBuilders, getRankDocs, hashCode, isCompound, isFragment, minScore, minScore, parseInnerRetrieverBuilder, parseTopLevelRetrieverBuilder, retrieverName, retrieverName, rewritePreFilters, setRankDocs, toString, toXContent, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContent
isFragment, toXContent
-
Field Details
-
NAME
- See Also:
-
STANDARD_RETRIEVER_SUPPORTED
-
QUERY_FIELD
-
SEARCH_AFTER_FIELD
-
TERMINATE_AFTER_FIELD
-
SORT_FIELD
-
COLLAPSE_FIELD
-
PARSER
-
-
Constructor Details
-
StandardRetrieverBuilder
public StandardRetrieverBuilder() -
StandardRetrieverBuilder
-
-
Method Details
-
fromXContent
public static StandardRetrieverBuilder fromXContent(XContentParser parser, RetrieverParserContext context) throws IOException - Throws:
IOException
-
rewrite
Description copied from interface:RewriteableRewrites this instance based on the provided context. The returned objects will be the same instance as this if no changes during the rewrite were applied.- Specified by:
rewritein interfaceRewriteable<RetrieverBuilder>- Overrides:
rewritein classRetrieverBuilder- Throws:
IOException
-
topDocsQuery
Description copied from class:RetrieverBuilderThis function is called by compoundRetrieverBuilderto return the original query that was used by this retriever to compute its top documents.- Specified by:
topDocsQueryin classRetrieverBuilder
-
extractToSearchSourceBuilder
public void extractToSearchSourceBuilder(SearchSourceBuilder searchSourceBuilder, boolean compoundUsed) Description copied from class:RetrieverBuilderThis method is called at the end of rewriting on behalf of aSearchSourceBuilder. Elements from retrievers are expected to be "extracted" into theSearchSourceBuilder.- Specified by:
extractToSearchSourceBuilderin classRetrieverBuilder
-
getName
- Specified by:
getNamein classRetrieverBuilder
-
doToXContent
- Specified by:
doToXContentin classRetrieverBuilder- Throws:
IOException
-
doEquals
- Specified by:
doEqualsin classRetrieverBuilder
-
doHashCode
public int doHashCode()- Specified by:
doHashCodein classRetrieverBuilder
-