Class PredictionQueryFactory
- java.lang.Object
-
- de.cxp.ocs.elasticsearch.query.builder.PredictionQueryFactory
-
- All Implemented Interfaces:
ESQueryFactory
public class PredictionQueryFactory extends Object implements 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 ;)).
SupportedQueryBuildingSettings:- 'analyzer' that is used to match the configured fields.
-
-
Constructor Summary
Constructors Constructor Description PredictionQueryFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowParallelSpellcheckExecution()MasterVariantQuerycreateQuery(List<QueryStringTerm> searchWords)voidinitialize(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
-
-
-
-
Method Detail
-
initialize
public void initialize(String name, Map<QueryBuildingSetting,String> settings, Map<String,Float> fieldWeights, FieldConfigAccess fieldConfig)
- Specified by:
initializein interfaceESQueryFactory
-
createQuery
public MasterVariantQuery createQuery(List<QueryStringTerm> searchWords)
- Specified by:
createQueryin interfaceESQueryFactory
-
allowParallelSpellcheckExecution
public boolean allowParallelSpellcheckExecution()
- Specified by:
allowParallelSpellcheckExecutionin interfaceESQueryFactory
-
-