eugene
eugene

Reputation: 41735

ElasticSearch, how do I use "boost_terms" in MLT?

https://www.elastic.co/guide/en/elasticsearch/reference/1.6/query-dsl-mlt-query.html#_query_formation_parameters

lists boost_terms but don't show how we should use it..

I failed to google it as well..

I tried

"boost_terms" = {
"field1": 3
}

"boost_terms" = ["field1"]
"boost_terms" = [3]

Upvotes: 3

Views: 1550

Answers (1)

taufikedys
taufikedys

Reputation: 339

"boost_terms" is boost value of the formed "terms/query" in the MLT (not field(s)), the domain is float and the default value is 1.0 (=disable). It change the weight vector of the terms in the query.

Usage example:

query:{"more_like_this":{"fields":[field1,field2],"like":"elastic kabana","boost_terms":3.0}}

Upvotes: 1

Related Questions