Class AssociatedTerm
java.lang.Object
de.cxp.ocs.elasticsearch.model.term.AssociatedTerm
- All Implemented Interfaces:
QueryStringTerm
A term that is associated with other terms (e.g. synonyms). They all will be
searched together each one as an optional replacement for the actual word.
- Author:
- Rudolf Batt
-
Constructor Summary
ConstructorsConstructorDescriptionAssociatedTerm
(QueryStringTerm mainTerm, Occur occur, Collection<QueryStringTerm> values) AssociatedTerm
(QueryStringTerm term1, QueryStringTerm term2) AssociatedTerm
(QueryStringTerm term, Collection<QueryStringTerm> values) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
putOrUpdate
(QueryStringTerm associatedTerm) builds a query liketoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.cxp.ocs.elasticsearch.model.term.QueryStringTerm
getOccur
-
Constructor Details
-
AssociatedTerm
-
AssociatedTerm
-
AssociatedTerm
-
-
Method Details
-
putOrUpdate
-
toQueryString
builds a query like(a OR "aa"^0.8 OR "aaa"^0.7)
using the related words. Related words are always quoted to prevent analysis.- Specified by:
toQueryString
in interfaceQueryStringTerm
- Returns:
- term in query-string-query format.
-
isEnclosed
public boolean isEnclosed()- Specified by:
isEnclosed
in interfaceQueryStringTerm
- Returns:
- if that query is already enclosed in quotes or brackets.
-
getRawTerm
- Specified by:
getRawTerm
in interfaceQueryStringTerm
- Returns:
- the single original unescaped term.
-
toString
-