search.asciidoc 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. * The boundary specified using geohashes in the `geo_bounding_box` query
  12. now include entire geohash cell, instead of just geohash center.
  13. * Attempts to generate multi-term phrase queries against non-text fields
  14. with a custom analyzer will now throw an exception
  15. ==== Adaptive replica selection enabled by default
  16. Adaptive replica selection has been enabled by default. If you wish to return to
  17. the older round robin of search requests, you can use the
  18. `cluster.routing.use_adaptive_replica_selection` setting:
  19. [source,js]
  20. --------------------------------------------------
  21. PUT /_cluster/settings
  22. {
  23. "transient": {
  24. "cluster.routing.use_adaptive_replica_selection": false
  25. }
  26. }
  27. --------------------------------------------------
  28. // CONSOLE
  29. ==== Search API returns `400` for invalid requests
  30. The Search API returns `400 - Bad request` while it would previously return
  31. `500 - Internal Server Error` in the following cases of invalid request:
  32. * the result window is too large
  33. * sort is used in combination with rescore
  34. * the rescore window is too large
  35. * the number of slices is too large
  36. * keep alive for scroll is too large
  37. * number of filters in the adjacency matrix aggregation is too large
  38. * script compilation errors
  39. ==== Scroll queries cannot use the `request_cache` anymore
  40. Setting `request_cache:true` on a query that creates a scroll (`scroll=1m`)
  41. has been deprecated in 6 and will now return a `400 - Bad request`.
  42. Scroll queries are not meant to be cached.
  43. ==== Term Suggesters supported distance algorithms
  44. The following string distance algorithms were given additional names in 6.2 and
  45. their existing names were deprecated. The deprecated names have now been
  46. removed.
  47. * `levenstein` - replaced by `levenshtein`
  48. * `jarowinkler` - replaced by `jaro_winkler`
  49. ==== Limiting the number of terms that can be used in a Terms Query request
  50. Executing a Terms Query with a lot of terms may degrade the cluster performance,
  51. as each additional term demands extra processing and memory.
  52. To safeguard against this, the maximum number of terms that can be used in a
  53. Terms Query request has been limited to 65536. This default maximum can be changed
  54. for a particular index with the index setting `index.max_terms_count`.
  55. ==== Limiting the length of regex that can be used in a Regexp Query request
  56. Executing a Regexp Query with a long regex string may degrade search performance.
  57. To safeguard against this, the maximum length of regex that can be used in a
  58. Regexp Query request has been limited to 1000. This default maximum can be changed
  59. for a particular index with the index setting `index.max_regex_length`.
  60. ==== Invalid `_search` request body
  61. Search requests with extra content after the main object will no longer be accepted
  62. by the `_search` endpoint. A parsing exception will be thrown instead.
  63. ==== Semantics changed for `max_concurrent_shard_requests`
  64. `max_concurrent_shard_requests` used to limit the total number of concurrent shard
  65. requests a single high level search request can execute. In 7.0 this changed to be the
  66. max number of concurrent shard requests per node. The default is now `5`.