Class MultiVariantQuery
java.lang.Object
de.cxp.ocs.elasticsearch.model.query.MultiVariantQuery
- All Implemented Interfaces:
AnalyzedQuery
A query that consists of several different analyzed queries.
- Author:
- Rudolf Batt
-
Constructor Summary
ConstructorsConstructorDescriptionMultiVariantQuery
(Collection<QueryStringTerm> inputTerms) MultiVariantQuery
(Collection<QueryStringTerm> inputTerms, List<AnalyzedQuery> queryVariation) MultiVariantQuery
(List<String> inputTerms, List<AnalyzedQuery> queryVariation) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(QueryTermVisitor visitor) void
addQueryVariant
(MultiTermQuery multiTermQuery) The original input terms that were used to create that query string.Transform into string according to the ElasticSearch Query String syntax.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.elasticsearch.model.query.AnalyzedQuery
getTermCount
-
Constructor Details
-
MultiVariantQuery
-
MultiVariantQuery
public MultiVariantQuery(Collection<QueryStringTerm> inputTerms, List<AnalyzedQuery> queryVariation) -
MultiVariantQuery
-
-
Method Details
-
addQueryVariant
-
getInputTerms
Description copied from interface:AnalyzedQuery
The original input terms that were used to create that query string.- Specified by:
getInputTerms
in interfaceAnalyzedQuery
- Returns:
- list of unescaped terms
-
toQueryString
Description copied from interface:AnalyzedQuery
Transform into string according to the ElasticSearch Query String syntax. TODO: change into Visitor Pattern Style: A method that accepts a visitor that is passed trough all the terms of the query. Similar to org.apache.lucene.search.QueryVisitor. This can then be used to generate the required query (LuceneQuery, structured ElasticsearchQuery, SQL Query.. =)).- Specified by:
toQueryString
in interfaceAnalyzedQuery
- Returns:
- term in query-string-query format.
-
accept
- Specified by:
accept
in interfaceAnalyzedQuery
-