Class MoreLikeThisQuery

java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
co.elastic.clients.elasticsearch._types.query_dsl.MoreLikeThisQuery
All Implemented Interfaces:
QueryVariant, JsonpSerializable

@JsonpDeserializable public class MoreLikeThisQuery extends QueryBase implements QueryVariant
See Also:
  • Field Details

  • Method Details

    • of

    • _queryKind

      public Query.Kind _queryKind()
      Query variant kind.
      Specified by:
      _queryKind in interface QueryVariant
    • analyzer

      @Nullable public final String analyzer()
      The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.

      API name: analyzer

    • boostTerms

      @Nullable public final Double boostTerms()
      Each term in the formed query could be further boosted by their tf-idf score. This sets the boost factor to use when using this feature. Defaults to deactivated (0).

      API name: boost_terms

    • failOnUnsupportedField

      @Nullable public final Boolean failOnUnsupportedField()
      Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (text or keyword).

      API name: fail_on_unsupported_field

    • fields

      public final List<String> fields()
      A list of fields to fetch and analyze the text from. Defaults to the index.query.default_field index setting, which has a default value of *.

      API name: fields

    • include

      @Nullable public final Boolean include()
      Specifies whether the input documents should also be included in the search results returned.

      API name: include

    • like

      public final List<Like> like()
      Required - Specifies free form text and/or a single or multiple documents for which you want to find similar documents.

      API name: like

    • maxDocFreq

      @Nullable public final Integer maxDocFreq()
      The maximum document frequency above which the terms are ignored from the input document.

      API name: max_doc_freq

    • maxQueryTerms

      @Nullable public final Integer maxQueryTerms()
      The maximum number of query terms that can be selected.

      API name: max_query_terms

    • maxWordLength

      @Nullable public final Integer maxWordLength()
      The maximum word length above which the terms are ignored. Defaults to unbounded (0).

      API name: max_word_length

    • minDocFreq

      @Nullable public final Integer minDocFreq()
      The minimum document frequency below which the terms are ignored from the input document.

      API name: min_doc_freq

    • minimumShouldMatch

      @Nullable public final String minimumShouldMatch()
      After the disjunctive query has been formed, this parameter controls the number of terms that must match.

      API name: minimum_should_match

    • minTermFreq

      @Nullable public final Integer minTermFreq()
      The minimum term frequency below which the terms are ignored from the input document.

      API name: min_term_freq

    • minWordLength

      @Nullable public final Integer minWordLength()
      The minimum word length below which the terms are ignored.

      API name: min_word_length

    • perFieldAnalyzer

      public final Map<String,String> perFieldAnalyzer()
      Overrides the default analyzer.

      API name: per_field_analyzer

    • routing

      @Nullable public final String routing()
      API name: routing
    • stopWords

      public final List<String> stopWords()
      An array of stop words. Any word in this set is ignored.

      API name: stop_words

    • unlike

      public final List<Like> unlike()
      Used in combination with like to exclude documents that match a set of terms.

      API name: unlike

    • version

      @Nullable public final Long version()
      API name: version
    • versionType

      @Nullable public final VersionType versionType()
      API name: version_type
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Overrides:
      serializeInternal in class QueryBase
    • setupMoreLikeThisQueryDeserializer

      protected static void setupMoreLikeThisQueryDeserializer(ObjectDeserializer<MoreLikeThisQuery.Builder> op)