Search and Query DSL changesedit

Changes to queriesedit

  • The default value for transpositions parameter of fuzzy query has been changed to true.

Adaptive replica selection enabled by defaultedit

Adaptive replica selection has been enabled by default. If you wish to return to the older round robin of search requests, you can use the cluster.routing.use_adaptive_replica_selection setting:

PUT /_cluster/settings
{
    "transient": {
        "cluster.routing.use_adaptive_replica_selection": false
    }
}

Search API returns 400 for invalid requestsedit

The Search API returns 400 - Bad request while it would previously return 500 - Internal Server Error in the following cases of invalid request:

  • the result window is too large
  • sort is used in combination with rescore
  • the rescore window is too large
  • the number of slices is too large
  • keep alive for scroll is too large
  • number of filters in the adjacency matrix aggregation is too large

Scroll queries cannot use the request_cache anymoreedit

Setting request_cache:true on a query that creates a scroll (scroll=1m) has been deprecated in 6 and will now return a 400 - Bad request. Scroll queries are not meant to be cached.

Term Suggesters supported distance algorithmsedit

The following string distance algorithms were given additional names in 6.2 and their existing names were deprecated. The deprecated names have now been removed.

  • levenstein - replaced by levenshtein
  • jarowinkler - replaced by jaro_winkler

Limiting the number of terms that can be used in a Terms Query requestedit

Executing a Terms Query with a lot of terms may degrade the cluster performance, as each additional term demands extra processing and memory. To safeguard against this, the maximum number of terms that can be used in a Terms Query request has been limited to 65536. This default maximum can be changed for a particular index with the index setting index.max_terms_count.