migrate_2_1.asciidoc 2.3 KB

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