search.asciidoc 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. [float]
  2. [[breaking_80_search_changes]]
  3. === Search Changes
  4. //NOTE: The notable-breaking-changes tagged regions are re-used in the
  5. //Installation and Upgrade Guide
  6. //tag::notable-breaking-changes[]
  7. //end::notable-breaking-changes[]
  8. .Search-related REST API endpoints containing mapping types have been removed.
  9. [%collapsible]
  10. ====
  11. *Details* +
  12. The `/{index}/{type}/_search`, `/{index}/{type}/_msearch`, `/{index}/{type}/_search/template` and `/{index}/{type}/_msearch/template` REST endpoints have been removed in favour of `/{index}/_search`, `/{index}/_msearch`, `/{index}/_search/template` and `/{index}/_msearch/template`; since indexes no longer contain types, these typed endpoints are obsolete..
  13. The `/{index}/{type}/_termvectors`, `/{index}/{type}/{id}/_termvectors` and `/{index}/{type}/_mtermvectors` REST endpoints have been removed in favour of `/{index}/_termvectors`, `/{index}/{id}/_termvectors` and `/{index}/_mtermvectors`; since indexes no longer contain types, these typed endpoints are obsolete..
  14. The `/{index}/{type}/{doc}` and `/{index}/{type}/_mget` REST endpoints have been removed in favour of `/{index}/_doc/{doc}` and `/{index}/_mget`; since indexes no longer contain types, these typed endpoints are obsolete.
  15. *Impact* +
  16. Use the replacement REST API endpoints. Requests submitted to API endpoints that
  17. contain a mapping type will return an error.
  18. ====
  19. .The `common` query has been removed.
  20. [%collapsible]
  21. ====
  22. *Details* +
  23. The `common` query, deprecated in 7.x, has been removed in 8.0.
  24. The same functionality can be achieved by the `match` query if the total number of hits is not tracked.
  25. *Impact* +
  26. Discontinue use of the `common` query. Search requests containing a `common`
  27. query will return an error.
  28. ====
  29. .The `cutoff_frequency` parameter has been removed from the `match` and `multi_match` query.
  30. [%collapsible]
  31. ====
  32. *Details* +
  33. The `cutoff_frequency` parameter, deprecated in 7.x, has been removed in 8.0 from `match` and `multi_match` queries.
  34. The same functionality can be achieved without any configuration provided that the total number of hits is not tracked.
  35. *Impact* +
  36. Discontinue use of the `cutoff_frequency` parameter. Search requests containing
  37. this parameter in a `match` or `multi_match` query will return an error.
  38. ====
  39. .The `nested_filter` and `nested_path` properties have been removed from the search API's `sort` request body parameter.
  40. [%collapsible]
  41. ====
  42. *Details* +
  43. The `nested_filter` and `nested_path` options, deprecated in 6.x, have been removed in favor of the `nested` context.
  44. *Impact* +
  45. Discontinue use of the `sort` request body parameter's `nested_filter` and
  46. `nested_path` properties. Requests containing these properties will return an
  47. error.
  48. ====
  49. .Search and get requests are now routed to shards using adaptive replica selection by default.
  50. [%collapsible]
  51. ====
  52. *Details* +
  53. {es} will no longer prefer using shards in the same location (with the same awareness attribute values) to process
  54. `_search` and `_get` requests. Adaptive replica selection (activated by default in this version) will route requests
  55. more efficiently using the service time of prior inter-node communications.
  56. *Impact* +
  57. No action needed.
  58. ====
  59. .The `sparse_vector` field datatype has been removed.
  60. [%collapsible]
  61. ====
  62. *Details* +
  63. The `sparse_vector` field type was deprecated in 7.6 and is now removed in
  64. 8.0. We have not seen much interest in this experimental field type, and don't
  65. see a clear use case as it's currently designed. If you have feedback or
  66. suggestions around sparse vector functionality, please let us know through
  67. GitHub or the 'discuss' forums.
  68. *Impact* +
  69. Discontinue use of the `sparse_vector` field datatype. Requests containing
  70. a mapping for this field datatype will return an error.
  71. ====
  72. .Vector functions using `(query, doc['field'])` are no longer supported.
  73. [%collapsible]
  74. ====
  75. *Details* +
  76. The vector functions of the form `function(query, doc['field'])` were
  77. deprecated in 7.6, and are now removed in 8.x. The form
  78. `function(query, 'field')` should be used instead. For example,
  79. `cosineSimilarity(query, doc['field'])` is replaced by
  80. `cosineSimilarity(query, 'field')`.
  81. *Impact* +
  82. Use the `function(query, 'field')` form. Discontinue use of the `function(query,
  83. doc['field'])` form. Requests containing the `function(query,
  84. doc['field'])` form will return an error.
  85. ====
  86. .The search API's `indices_boost` request body parameter no longer accepts object values.
  87. [%collapsible]
  88. ====
  89. *Details* +
  90. The `indices_boost` option in the search request used to accept the boosts
  91. both as an object and as an array. The object format has been deprecated since
  92. 5.2 and is now removed in 8.0.
  93. *Impact* +
  94. Use only array values in the `indices_boost` parameter. Requests containing an
  95. object value in the `indices_boost` parameter will return an error.
  96. ====
  97. .The search API's `use_field_mapping` request body parameter has been removed.
  98. [%collapsible]
  99. ====
  100. *Details* +
  101. In 7.0, we began formatting `docvalue_fields` by default using each field's
  102. mapping definition. To ease the transition from 6.x, we added the format
  103. option `use_field_mapping`. This parameter was deprecated in 7.0, and is now
  104. removed in 8.0.
  105. *Impact* +
  106. Discontinue use of the `use_field_mapping` request body parameter. Requests
  107. containing this parameter will return an error.
  108. ====
  109. .The search API's `from` request body and url parameter cannot be negative.
  110. [%collapsible]
  111. ====
  112. *Details* +
  113. Search request used to accept `-1` as a `from` in the search body and the url,
  114. treating it as the default value of 0. Other negative values got rejected with
  115. an error already. We now also reject `-1` as an invalid value.
  116. *Impact* +
  117. Change any use of `-1` as `from` parameter in request body or url parameters by either
  118. setting it to `0` or omitting it entirely. Requests containing negative values will
  119. return an error.
  120. ====