Class NgramQueryFactory
java.lang.Object
de.cxp.ocs.elasticsearch.query.builder.NgramQueryFactory
- All Implemented Interfaces:
ESQueryFactory
Builds a multi-match-query that uses the ngram sub-fields to handle decomposition and fuzziness.
SupportedQueryBuildingSetting
s:
- tieBreaker
- multimatch_type
- minShouldMatch
- acceptNoResult: if set to true, no results will be accepted and no further search is done
- allowParallelSpellcheck: run parallel spell-check with this query. If terms could be corrected and 0 results are found, this query is built again with the corrected terms.
-
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
-
Constructor Details
-
NgramQueryFactory
public NgramQueryFactory()
-
-
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
-