Track total hits: support by integer?

An exception occurred when setting an integer to track_total_hits.

The doc is written as set track_total_hits as an integer.

Is there a way to set an integer?

Version

7.0.0-alpha2

Request

GET _search
{
  "track_total_hits": 100,
  "query": {
    "match_all": {}
  }
}

Response

{
  "error": {
    "root_cause": [
      {
        "type": "json_parse_exception",
        "reason": "Current token (VALUE_NUMBER_INT) not of boolean type\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@6e6e840f; line: 2, column: 26]"
      }
    ],
    "type": "json_parse_exception",
    "reason": "Current token (VALUE_NUMBER_INT) not of boolean type\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@6e6e840f; line: 2, column: 26]"
  },
  "status": 500
}

See

https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-track-total-hits.html#search-request-track-total-hits

@jimczi Could you look?

Thanks for testing the alpha2 release!
This feature has been added after the release of 7.0.0-alpha2 so it is currently only in the master branch.
and will be available in the next 7.0 release, the docs wrongly refer to 7.0.0-alpha2 but it contains new features that are only in master:

Thanks @jimczi @dadoonet
Looking forward to the next 7.0 release :grinning:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.