java.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. You should preferably use the available constants (e.g.
  17. Fuzziness.ONE, Fuzziness.AUTO) or build your own instance using the above
  18. mentioned factory methods.
  19. Fuzziness used to be lenient when it comes to parsing arbitrary numeric values
  20. while silently truncating them to one of the three allowed edit distances 0, 1
  21. or 2. This leniency is now removed and the class will throw errors when trying
  22. to construct an instance with another value (e.g. floats like 1.3 used to get
  23. accepted but truncated to 1). You should use one of the allowed values.
  24. ====
  25. .Changes to `Repository`.
  26. [%collapsible]
  27. ====
  28. *Details* +
  29. Repository has no dependency on IndexShard anymore. The contract of restoreShard
  30. and snapshotShard has been reduced to Store and MappingService in order to improve
  31. testability.
  32. ====