search.asciidoc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. [float]
  2. [[breaking_70_search_changes]]
  3. === Search and Query DSL changes
  4. [float]
  5. ==== Changes to queries
  6. * The default value for `transpositions` parameter of `fuzzy` query
  7. has been changed to `true`.
  8. * The `query_string` options `use_dismax`, `split_on_whitespace`,
  9. `all_fields`, `locale`, `auto_generate_phrase_query` and
  10. `lowercase_expanded_terms` deprecated in 6.x have been removed.
  11. * Purely negative queries (only MUST_NOT clauses) now return a score of `0`
  12. rather than `1`.
  13. * The boundary specified using geohashes in the `geo_bounding_box` query
  14. now include entire geohash cell, instead of just geohash center.
  15. * Attempts to generate multi-term phrase queries against non-text fields
  16. with a custom analyzer will now throw an exception
  17. [float]
  18. ==== Adaptive replica selection enabled by default
  19. Adaptive replica selection has been enabled by default. If you wish to return to
  20. the older round robin of search requests, you can use the
  21. `cluster.routing.use_adaptive_replica_selection` setting:
  22. [source,js]
  23. --------------------------------------------------
  24. PUT /_cluster/settings
  25. {
  26. "transient": {
  27. "cluster.routing.use_adaptive_replica_selection": false
  28. }
  29. }
  30. --------------------------------------------------
  31. // CONSOLE
  32. [float]
  33. ==== Search API returns `400` for invalid requests
  34. The Search API returns `400 - Bad request` while it would previously return
  35. `500 - Internal Server Error` in the following cases of invalid request:
  36. * the result window is too large
  37. * sort is used in combination with rescore
  38. * the rescore window is too large
  39. * the number of slices is too large
  40. * keep alive for scroll is too large
  41. * number of filters in the adjacency matrix aggregation is too large
  42. * script compilation errors
  43. [float]
  44. ==== Scroll queries cannot use the `request_cache` anymore
  45. Setting `request_cache:true` on a query that creates a scroll (`scroll=1m`)
  46. has been deprecated in 6 and will now return a `400 - Bad request`.
  47. Scroll queries are not meant to be cached.
  48. [float]
  49. ==== Scroll queries cannot use `rescore` anymore
  50. Including a rescore clause on a query that creates a scroll (`scroll=1m`) has
  51. been deprecated in 6.5 and will now return a `400 - Bad request`. Allowing
  52. rescore on scroll queries would break the scroll sort. In the 6.x line, the
  53. rescore clause was silently ignored (for scroll queries), and it was allowed in
  54. the 5.x line.
  55. [float]
  56. ==== Term Suggesters supported distance algorithms
  57. The following string distance algorithms were given additional names in 6.2 and
  58. their existing names were deprecated. The deprecated names have now been
  59. removed.
  60. * `levenstein` - replaced by `levenshtein`
  61. * `jarowinkler` - replaced by `jaro_winkler`
  62. [float]
  63. ==== Limiting the number of terms that can be used in a Terms Query request
  64. Executing a Terms Query with a lot of terms may degrade the cluster performance,
  65. as each additional term demands extra processing and memory.
  66. To safeguard against this, the maximum number of terms that can be used in a
  67. Terms Query request has been limited to 65536. This default maximum can be changed
  68. for a particular index with the index setting `index.max_terms_count`.
  69. [float]
  70. ==== Limiting the length of regex that can be used in a Regexp Query request
  71. Executing a Regexp Query with a long regex string may degrade search performance.
  72. To safeguard against this, the maximum length of regex that can be used in a
  73. Regexp Query request has been limited to 1000. This default maximum can be changed
  74. for a particular index with the index setting `index.max_regex_length`.
  75. [float]
  76. ==== Invalid `_search` request body
  77. Search requests with extra content after the main object will no longer be accepted
  78. by the `_search` endpoint. A parsing exception will be thrown instead.
  79. [float]
  80. ==== Context Completion Suggester
  81. The ability to query and index context enabled suggestions without context,
  82. deprecated in 6.x, has been removed. Context enabled suggestion queries
  83. without contexts have to visit every suggestion, which degrades the search performance
  84. considerably.
  85. For geo context the value of the `path` parameter is now validated against the mapping,
  86. and the context is only accepted if `path` points to a field with `geo_point` type.
  87. [float]
  88. ==== Semantics changed for `max_concurrent_shard_requests`
  89. `max_concurrent_shard_requests` used to limit the total number of concurrent shard
  90. requests a single high level search request can execute. In 7.0 this changed to be the
  91. max number of concurrent shard requests per node. The default is now `5`.
  92. [float]
  93. ==== `max_score` set to `null` when scores are not tracked
  94. `max_score` used to be set to `0` whenever scores are not tracked. `null` is now used
  95. instead which is a more appropriate value for a scenario where scores are not available.