java.asciidoc 1.4 KB

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