Class PredictionQueryFactory
java.lang.Object
de.cxp.ocs.elasticsearch.query.builder.PredictionQueryFactory
- All Implemented Interfaces:
FallbackConsumer
,ESQueryFactory
Query factory that analyzes the search keywords and already checks Elasticsearch about which terms hit documents together (including spell correction and term shingles). Based on that analysis a query is built that tries to match most of the terms (magic algorithm ;)).
SupportedQueryBuildingSetting
s:
- 'analyzer' that is used to match the configured fields.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
TextMatchQuery
<org.elasticsearch.index.query.QueryBuilder> createQuery
(ExtendedQuery parsedQuery) void
initialize
(String name, Map<QueryBuildingSetting, String> settings, Map<String, Float> fieldWeights, FieldConfigAccess fieldConfig) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.cxp.ocs.spi.search.ESQueryFactory
getName
Methods inherited from interface de.cxp.ocs.elasticsearch.query.builder.FallbackConsumer
setFallbackQueryBuilder
-
Constructor Details
-
PredictionQueryFactory
public PredictionQueryFactory()
-
-
Method Details
-
initialize
public void initialize(String name, Map<QueryBuildingSetting, String> settings, Map<String, Float> fieldWeights, FieldConfigAccess fieldConfig) - Specified by:
initialize
in interfaceESQueryFactory
-
createQuery
public TextMatchQuery<org.elasticsearch.index.query.QueryBuilder> createQuery(ExtendedQuery parsedQuery) - Specified by:
createQuery
in interfaceESQueryFactory
-
allowParallelSpellcheckExecution
public boolean allowParallelSpellcheckExecution()- Specified by:
allowParallelSpellcheckExecution
in interfaceESQueryFactory
-