search.asciidoc 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [[breaking_70_search_changes]]
  2. === Search and Query DSL changes
  3. ==== Changes to queries
  4. * The default value for `transpositions` parameter of `fuzzy` query
  5. has been changed to `true`.
  6. * The `query_string` options `use_dismax`, `split_on_whitespace`,
  7. `all_fields`, `locale`, `auto_generate_phrase_query` and
  8. `lowercase_expanded_terms` deprecated in 6.x have been removed.
  9. * Purely negative queries (only MUST_NOT clauses) now return a score of `0`
  10. rather than `1`.
  11. ==== Adaptive replica selection enabled by default
  12. Adaptive replica selection has been enabled by default. If you wish to return to
  13. the older round robin of search requests, you can use the
  14. `cluster.routing.use_adaptive_replica_selection` setting:
  15. [source,js]
  16. --------------------------------------------------
  17. PUT /_cluster/settings
  18. {
  19. "transient": {
  20. "cluster.routing.use_adaptive_replica_selection": false
  21. }
  22. }
  23. --------------------------------------------------
  24. // CONSOLE
  25. ==== Search API returns `400` for invalid requests
  26. The Search API returns `400 - Bad request` while it would previously return
  27. `500 - Internal Server Error` in the following cases of invalid request:
  28. * the result window is too large
  29. * sort is used in combination with rescore
  30. * the rescore window is too large
  31. * the number of slices is too large
  32. * keep alive for scroll is too large
  33. * number of filters in the adjacency matrix aggregation is too large
  34. ==== Scroll queries cannot use the `request_cache` anymore
  35. Setting `request_cache:true` on a query that creates a scroll (`scroll=1m`)
  36. has been deprecated in 6 and will now return a `400 - Bad request`.
  37. Scroll queries are not meant to be cached.
  38. ==== Term Suggesters supported distance algorithms
  39. The following string distance algorithms were given additional names in 6.2 and
  40. their existing names were deprecated. The deprecated names have now been
  41. removed.
  42. * `levenstein` - replaced by `levenshtein`
  43. * `jarowinkler` - replaced by `jaro_winkler`
  44. ==== Limiting the number of terms that can be used in a Terms Query request
  45. Executing a Terms Query with a lot of terms may degrade the cluster performance,
  46. as each additional term demands extra processing and memory.
  47. To safeguard against this, the maximum number of terms that can be used in a
  48. Terms Query request has been limited to 65536. This default maximum can be changed
  49. for a particular index with the index setting `index.max_terms_count`.
  50. ==== Limiting the length of regex that can be used in a Regexp Query request
  51. Executing a Regexp Query with a long regex string may degrade search performance.
  52. To safeguard against this, the maximum length of regex that can be used in a
  53. Regexp Query request has been limited to 1000. This default maximum can be changed
  54. for a particular index with the index setting `index.max_regex_length`.
  55. ==== Invalid `_search` request body
  56. Search requests with extra content after the main object will no longer be accepted
  57. by the `_search` endpoint. A parsing exception will be thrown instead.