public class SearchModule extends AbstractModule
Constructor and Description |
---|
SearchModule(Settings settings,
NamedWriteableRegistry namedWriteableRegistry) |
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
public SearchModule(Settings settings, NamedWriteableRegistry namedWriteableRegistry)
public void registerHighlighter(java.lang.String key, java.lang.Class<? extends Highlighter> clazz)
public void registerSuggester(java.lang.String key, Suggester<?> suggester)
public <T extends ScoreFunctionBuilder<T>> void registerScoreFunction(Writeable.Reader<T> reader, ScoreFunctionParser<T> parser, ParseField functionName)
ScoreFunctionParser
which parses XContent into a ScoreFunctionBuilder
using its ParseField
Writeable.Reader
which reads a stream representation of the builder under the
ParseField.getPreferredName().public ParseFieldRegistry<ScoreFunctionParser<?>> getScoreFunctionParserRegistry()
public <QB extends QueryBuilder<QB>> void registerQuery(Writeable.Reader<QB> reader, QueryParser<QB> queryParser, ParseField queryName)
reader
- the reader registered for this query's builder. Typically a reference to a constructor that takes a
StreamInput
queryParser
- the parser the reads the query builder from xcontentqueryName
- holds the names by which this query might be parsed. The ParseField.getPreferredName()
is special as it
is the name by under which the reader is registered. So it is the name that the query should use as its
NamedWriteable.getWriteableName()
too.public IndicesQueriesRegistry getQueryParserRegistry()
public void registerFetchSubPhase(java.lang.Class<? extends FetchSubPhase> subPhase)
public void registerSignificanceHeuristic(ParseField heuristicName, Writeable.Reader<SignificanceHeuristic> reader, SignificanceHeuristicParser parser)
SignificanceHeuristic
.heuristicName
- the name(s) at which the heuristic is parsed and streamed. The ParseField.getPreferredName()
is the name
under which it is streamed. All names work for the parser.reader
- reads the heuristic from a streamparser
- reads the heuristic from an XContentParserpublic ParseFieldRegistry<SignificanceHeuristicParser> getSignificanceHeuristicParserRegistry()
SignificanceHeuristic
s.public void registerMovingAverageModel(ParseField modelName, Writeable.Reader<MovAvgModel> reader, MovAvgModel.AbstractModelParser parser)
MovAvgModel
.modelName
- the name(s) at which the model is parsed and streamed. The ParseField.getPreferredName()
is the name under
which it is streamed. All named work for the parser.reader
- reads the model from a streamparser
- reads the model from an XContentParserpublic ParseFieldRegistry<MovAvgModel.AbstractModelParser> getMovingAverageMdelParserRegistry()
MovAvgModel
s.public <AB extends AggregatorBuilder<AB>> void registerAggregation(Writeable.Reader<AB> reader, Aggregator.Parser aggregationParser, ParseField aggregationName)
reader
- reads the aggregation builder from a streamaggregationParser
- reads the aggregation builder from XContentaggregationName
- names by which the aggregation may be parsed. The first name is special because it is the name that the reader
is registered under.public <AB extends PipelineAggregatorBuilder<AB>> void registerPipelineAggregation(Writeable.Reader<AB> reader, PipelineAggregator.Parser aggregationParser, ParseField aggregationName)
reader
- reads the aggregation builder from a streamaggregationParser
- reads the aggregation builder from XContentaggregationName
- names by which the aggregation may be parsed. The first name is special because it is the name that the reader
is registered under.public AggregatorParsers getAggregatorParsers()
protected void configure()
AbstractModule
Binder
via the exposed methods.configure
in class AbstractModule
protected void configureFetchSubPhase()
protected void configureHighlighters()
protected void configureAggs()
protected void configureSearch()
public Suggesters getSuggesters()