migrate_2_1.asciidoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. === Mapping changes
  23. ==== position_offset_gap
  24. The default `position_offset_grap` is now 100. Indexes created in Elasticsearch
  25. 2.1.0 will default to using 100 and indexes created before that will continue
  26. to use the old default of 0. This was done to prevent phrase queries from
  27. matching across different values of the same term unexpectedly. Specifically,
  28. 100 was chosen to cause phrase queries with slops up to 99 to match only within
  29. a single value of a field.