migrate_2_1.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. [[breaking-changes-2.1]]
  2. == Breaking changes in 2.1
  3. This section discusses the changes that you need to be aware of when migrating
  4. your application to Elasticsearch 2.1.
  5. * <<breaking_21_search_changes>>
  6. * <<breaking_21_update_changes>>
  7. * <<breaking_21_removed_features>>
  8. * <<breaking_21_more_like_this>>
  9. * <<breaking_21_nested_sorting>>
  10. * <<breaking_21_index_apis>>
  11. [[breaking_21_search_changes]]
  12. === Search changes
  13. ==== `search_type=scan` deprecated
  14. The `scan` search type has been deprecated. All benefits from this search
  15. type can now be achieved by doing a scroll request that sorts documents in
  16. `_doc` order, for instance:
  17. [source,sh]
  18. ---------------
  19. GET /my_index/_search?scroll=2m
  20. {
  21. "sort": [
  22. "_doc"
  23. ]
  24. }
  25. ---------------
  26. Scroll requests sorted by `_doc` have been optimized to more efficiently resume
  27. from where the previous request stopped, so this will have the same performance
  28. characteristics as the former `scan` search type.
  29. ==== from + size limits
  30. Elasticsearch will now return an error message if a query's `from` + `size` is
  31. more than the `index.max_result_window` parameter. This parameter defaults to
  32. 10,000 which is safe for almost all clusters. Values higher than can consume
  33. significant chunks of heap memory per search and per shard executing the
  34. search. It's safest to leave this value as it is an use the scroll api for any
  35. deep scrolling but this setting is dynamic so it can raised or lowered as
  36. needed.
  37. [[breaking_21_update_changes]]
  38. === Update changes
  39. ==== Updates now `detect_noop` by default
  40. We've switched the default value of the `detect_noop` option from `false` to
  41. `true`. This means that Elasticsearch will ignore updates that don't change
  42. source unless you explicitly set `"detect_noop": false`. `detect_noop` was
  43. always computationally cheap compared to the expense of the update which can be
  44. thought of as a delete operation followed by an index operation.
  45. [[breaking_21_removed_features]]
  46. === Removed features
  47. ==== `indices.fielddata.cache.expire`
  48. The experimental feature `indices.fielddata.cache.expire` has been removed.
  49. For indices that have this setting configured, this config will be ignored.
  50. [[breaking_21_more_like_this]]
  51. === More Like This
  52. The MoreLikeThisQueryBuilder#ignoreLike methods have been deprecated in favor
  53. of using the unlike methods.
  54. MoreLikeThisBuilder#addItem has been deprecated in favor of using
  55. MoreLikeThisBuilder#addLikeItem.
  56. [[breaking_21_nested_sorting]]
  57. === Nested sorting
  58. If sorting on field inside a nested object then the `nested_path` should be specified.
  59. Before there was an attempt to resolve the nested path automatically, but that was sometimes incorrect.
  60. To avoid confusion the `nested_path` should always be specified.
  61. [[breaking_21_index_apis]]
  62. === Index APIs
  63. ==== Optimize API
  64. The Optimize API has been deprecated, all new optimize actions should use the new Force Merge API.