Class MoreLikeThisQuery
java.lang.Object
org.opensearch.client.opensearch._types.query_dsl.QueryBase
org.opensearch.client.opensearch._types.query_dsl.MoreLikeThisQuery
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,QueryVariant,ToCopyableBuilder<MoreLikeThisQuery.Builder,MoreLikeThisQuery>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class MoreLikeThisQuery
extends QueryBase
implements QueryVariant, ToCopyableBuilder<MoreLikeThisQuery.Builder,MoreLikeThisQuery>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase
QueryBase.AbstractBuilder<BuilderT extends QueryBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<MoreLikeThisQuery> Json deserializer forMoreLikeThisQuery -
Method Summary
Modifier and TypeMethodDescriptionQueryvariant kind.final Stringanalyzer()The analyzer that is used to analyze the free form text.final FloatEach term in the formed query could be further boosted by their tf-idf score.static MoreLikeThisQuery.Builderbuilder()booleanfinal BooleanControls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (textorkeyword).fields()A list of fields to fetch and analyze the text from.inthashCode()final Booleaninclude()Specifies whether the input documents should also be included in the search results returned.like()Required - Specifies free form text and/or a single or multiple documents for which you want to find similar documents.final IntegerThe maximum document frequency above which the terms are ignored from the input document.final IntegerThe maximum number of query terms that can be selected.final IntegerThe maximum word length above which the terms are ignored.final IntegerThe minimum document frequency below which the terms are ignored from the input document.final StringAPI name:minimum_should_matchfinal IntegerThe minimum term frequency below which the terms are ignored from the input document.final IntegerThe minimum word length below which the terms are ignored.static MoreLikeThisQueryOverrides the default analyzer.final Stringrouting()API name:routingprotected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidAPI name:stop_wordsCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.unlike()Used in combination withliketo exclude documents that match a set of terms.final Longversion()API name:versionfinal VersionTypeAPI name:version_typeMethods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase
boost, queryName, serialize, setupQueryBaseDeserializerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.opensearch._types.query_dsl.QueryVariant
toQueryMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forMoreLikeThisQuery
-
-
Method Details
-
of
public static MoreLikeThisQuery of(Function<MoreLikeThisQuery.Builder, ObjectBuilder<MoreLikeThisQuery>> fn) -
_queryKind
Queryvariant kind.- Specified by:
_queryKindin interfaceQueryVariant
-
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
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
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (textorkeyword).API name:
fail_on_unsupported_field -
fields
A list of fields to fetch and analyze the text from. Defaults to theindex.query.default_fieldindex setting, which has a default value of*.API name:
fields -
include
Specifies whether the input documents should also be included in the search results returned.API name:
include -
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
The maximum document frequency above which the terms are ignored from the input document.API name:
max_doc_freq -
maxQueryTerms
The maximum number of query terms that can be selected.API name:
max_query_terms -
maxWordLength
The maximum word length above which the terms are ignored. Defaults to unbounded (0).API name:
max_word_length -
minDocFreq
The minimum document frequency below which the terms are ignored from the input document.API name:
min_doc_freq -
minTermFreq
The minimum term frequency below which the terms are ignored from the input document.API name:
min_term_freq -
minWordLength
The minimum word length below which the terms are ignored.API name:
min_word_length -
minimumShouldMatch
API name:minimum_should_match -
perFieldAnalyzer
Overrides the default analyzer.API name:
per_field_analyzer -
routing
API name:routing -
stopWords
API name:stop_words -
unlike
Used in combination withliketo exclude documents that match a set of terms.API name:
unlike -
version
API name:version -
versionType
API name:version_type -
serializeInternal
- Overrides:
serializeInternalin classQueryBase
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<MoreLikeThisQuery.Builder,MoreLikeThisQuery> - Returns:
- a new builder instance.
-
builder
-
setupMoreLikeThisQueryDeserializer
protected static void setupMoreLikeThisQueryDeserializer(ObjectDeserializer<MoreLikeThisQuery.Builder> op) -
hashCode
public int hashCode() -
equals
-