Elasticsearch: Documment "boost" in "terms" query

Created on 29 Jan 2013  路  6Comments  路  Source: elastic/elasticsearch

The "terms" query (http://www.elasticsearch.org/guide/reference/query-dsl/terms-query.html) supports the "boost" parameter (as mentioned by Radu Gheorghe in https://groups.google.com/d/topic/elasticsearch/MtKEKJ0b1Lo/discussion). I've tested it and it works. But it isn't mentioned in the docummentation.

For compatison, the "term" query (http://www.elasticsearch.org/guide/reference/query-dsl/term-query.html) does mention the "boost" parameter.

Please, mention the support of the "boost" parameter in the "terms" query docummentation!

Most helpful comment

Hi everyone, i was also checking the official docs and couldn't find information on boost for terms, i ask because the way to build the config changes between type and type (term expects a value attribute while match expects a query one), and both links provided on this thread don't exist anymore :S

All 6 comments

All queries support a "boost". The Elastic.js documentation has documented all options for queries, filters, and facets.

http://docs.fullscale.co/elasticjs/ejs.html

Thanks for the pointer, Mark!

As a newby user the first place I was looking at was the "official" documentation at http://www.elasticsearch.org/.
It hasn't occured to me that to see the full list of options you have to look elsewhere.

The official documentation covers the more common and important options. While developing Elastic.js, I made a point to document all options I found while going though the ElasticSearch source code and figure it is a good reference for people using the REST api as well as Elastic.js.

I see. Cool.

Hi everyone, i was also checking the official docs and couldn't find information on boost for terms, i ask because the way to build the config changes between type and type (term expects a value attribute while match expects a query one), and both links provided on this thread don't exist anymore :S

For those who we're wondering on how to boost a terms query, here's how:

'terms' => [
    'ids' => [3, 50, 33],
    'boost' => 3.0
]
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpountz picture jpountz  路  75Comments

kul picture kul  路  72Comments

bubo77 picture bubo77  路  43Comments

javanna picture javanna  路  72Comments

clintongormley picture clintongormley  路  55Comments