Package org.nuxeo.elasticsearch.hint
Class MoreLikeThisESHintQueryBuilder
- java.lang.Object
-
- org.nuxeo.elasticsearch.hint.MoreLikeThisESHintQueryBuilder
-
- All Implemented Interfaces:
ESHintQueryBuilder
public class MoreLikeThisESHintQueryBuilder extends Object implements ESHintQueryBuilder
The implementation ofESHintQueryBuilder
for the "more_like_this" Elasticsearch hint operator.- Since:
- 11.1
-
-
Field Summary
Fields Modifier and Type Field Description static int
MORE_LIKE_THIS_MAX_QUERY_TERMS
static int
MORE_LIKE_THIS_MIN_DOC_FREQ
static int
MORE_LIKE_THIS_MIN_TERM_FREQ
-
Constructor Summary
Constructors Constructor Description MoreLikeThisESHintQueryBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item[]
getItems(Object value)
Build a single or an array ofMoreLikeThisQueryBuilder.Item
according to the value type.org.elasticsearch.index.query.QueryBuilder
make(EsHint hint, String fieldName, Object value)
Builds the ElasticsearchQueryBuilder
.
-
-
-
Field Detail
-
MORE_LIKE_THIS_MIN_TERM_FREQ
public static final int MORE_LIKE_THIS_MIN_TERM_FREQ
- See Also:
- Constant Field Values
-
MORE_LIKE_THIS_MIN_DOC_FREQ
public static final int MORE_LIKE_THIS_MIN_DOC_FREQ
- See Also:
- Constant Field Values
-
MORE_LIKE_THIS_MAX_QUERY_TERMS
public static final int MORE_LIKE_THIS_MAX_QUERY_TERMS
- See Also:
- Constant Field Values
-
-
Method Detail
-
make
public org.elasticsearch.index.query.QueryBuilder make(EsHint hint, String fieldName, Object value)
Builds the ElasticsearchQueryBuilder
.- Specified by:
make
in interfaceESHintQueryBuilder
- Parameters:
hint
- the elasticsearch hintfieldName
- the elasticsearch field namevalue
- the value that we are looking for- Returns:
MoreLikeThisQueryBuilder
-
getItems
public static org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item[] getItems(Object value)
Build a single or an array ofMoreLikeThisQueryBuilder.Item
according to the value type. Where eachMoreLikeThisQueryBuilder.Item
represent a document request- Parameters:
value
- represent what we are looking for. Can beString
or an array ofString
- Returns:
- the items / document requests
-
-