java.asciidoc 1.4 KB

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