Class MoreLikeThisESHintQueryBuilder

java.lang.Object
org.nuxeo.elasticsearch.hint.MoreLikeThisESHintQueryBuilder
All Implemented Interfaces:
ESHintQueryBuilder

public class MoreLikeThisESHintQueryBuilder extends Object implements ESHintQueryBuilder
The implementation of ESHintQueryBuilder for the "more_like_this" Elasticsearch hint operator.
Since:
11.1
  • Field Details

    • MORE_LIKE_THIS_MIN_TERM_FREQ

      public static final int MORE_LIKE_THIS_MIN_TERM_FREQ
      See Also:
    • MORE_LIKE_THIS_MIN_DOC_FREQ

      public static final int MORE_LIKE_THIS_MIN_DOC_FREQ
      See Also:
    • MORE_LIKE_THIS_MAX_QUERY_TERMS

      public static final int MORE_LIKE_THIS_MAX_QUERY_TERMS
      See Also:
  • Constructor Details

    • MoreLikeThisESHintQueryBuilder

      public MoreLikeThisESHintQueryBuilder()
  • Method Details

    • make

      public org.opensearch.index.query.QueryBuilder make(EsHint hint, String fieldName, Object value)
      Builds the Elasticsearch QueryBuilder.

      Specified by:
      make in interface ESHintQueryBuilder
      Parameters:
      hint - the elasticsearch hint
      fieldName - the elasticsearch field name
      value - the value that we are looking for
      Returns:
      MoreLikeThisQueryBuilder
    • getItems

      public static org.opensearch.index.query.MoreLikeThisQueryBuilder.Item[] getItems(Object value)
      Build a single or an array of MoreLikeThisQueryBuilder.Item according to the value type. Where each MoreLikeThisQueryBuilder.Item represent a document request
      Parameters:
      value - represent what we are looking for. Can be String or an array of String
      Returns:
      the items / document requests