java-api-changes.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [discrete]
  2. [[breaking_80_java_api_changes]]
  3. ==== Java API 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. [[ilm-hlrc-rename]]
  8. .The `indexlifecycle` package has been renamed `ilm` in the Java High Level REST Client.
  9. [%collapsible]
  10. ====
  11. *Details* +
  12. In the high level REST client, the `indexlifecycle` package has been
  13. renamed to `ilm` to match the package rename inside the {es} code.
  14. *Impact* +
  15. Update your workflow and applications to use the `ilm` package in place of
  16. `indexlifecycle`.
  17. ====
  18. .Changes to `Fuzziness`.
  19. [%collapsible]
  20. ====
  21. *Details* +
  22. To create `Fuzziness` instances, use the `fromString` and `fromEdits` method
  23. instead of the `build` method that used to accept both Strings and numeric
  24. values. Several fuzziness setters on query builders (e.g.
  25. MatchQueryBuilder#fuzziness) now accept only a `Fuzziness`instance instead of
  26. an Object.
  27. Fuzziness used to be lenient when it comes to parsing arbitrary numeric values
  28. while silently truncating them to one of the three allowed edit distances 0, 1
  29. or 2. This leniency is now removed and the class will throw errors when trying
  30. to construct an instance with another value (e.g. floats like 1.3 used to get
  31. accepted but truncated to 1).
  32. *Impact* +
  33. Use the available constants (e.g. `Fuzziness.ONE`, `Fuzziness.AUTO`) or build
  34. your own instance using the above mentioned factory methods. Use only allowed
  35. `Fuzziness` values.
  36. ====
  37. .Changes to `Repository`.
  38. [%collapsible]
  39. ====
  40. *Details* +
  41. Repository has no dependency on IndexShard anymore. The contract of restoreShard
  42. and snapshotShard has been reduced to Store and MappingService in order to improve
  43. testability.
  44. *Impact* +
  45. No action needed.
  46. ====
  47. //end::notable-breaking-changes[]