java-api-changes.asciidoc 1.6 KB

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