Home > Net >  Elasticsearch: adding document with completion suggester, maximum value of the weight
Elasticsearch: adding document with completion suggester, maximum value of the weight

Time:10-07

In ElasticSearch I can index documents with support for completion suggester by using something like:

PUT music/_doc/1?refresh
{
  "suggest": [
    {
      "input": "Nevermind",
      "weight": 10
    }
  ]
}

The weight parameter affects the score when suggest query is issued. The documentation stats that weight should be a positive integer but it does not talk about any maximum value, what is the maximum value I can use for the weight?

CodePudding user response:

It's easy to find out by putting a very high value to make it error out, but according to the code, the valid interval for weights are the range of positive integers, so [0..2147483647]

  • Related