J.Done
J.Done

Reputation: 3033

ElasticSearch - added extra query option

I made elasticsearch(version 5.1) query from java.

It just tried to find document that maching with field string.

boolQuery.filter(QueryBuilders.termQuery("field", "test"));

When being converted as es json query, it added extra things.

'boost', 'disable_coord', 'adjust_pure_negative'

"query" : {
    "bool" : {
      "filter" : [
        {
          "term" : {
            "field" : {
              "value" : "test",
              "boost" : 1.0
            }
          }
        }
      ],
      "disable_coord" : false,
      "adjust_pure_negative" : true,
      "boost" : 1.0
    }
  }

Do I need boost event if I'm not going to use score information? What are rest of tham and how to take them out from query?

Upvotes: 2

Views: 755

Answers (1)

Related Questions