Search 6 groundwork - Clean up and factorize code around converters and type-specific features in backends

Description

In particular:

  • Some names are confusing, as mentioned here: https://github.com/hibernate/hibernate-search/pull/1830#discussion_r240545437

  • The UserIndexFieldConverter class seem unnecessary: it aggregates two converters, which is not really useful now that converters are always used from within a factory, knowing that each factory only uses one of the two aggregated converters.

  • The LuceneFieldConverter/ElasticsearchFieldConverter seem unnecessary: some add behavior to convert from the exposed type to the encoded type (e.g. LocalDate to Long), but that's something that we already do in the codec class. Why duplicate the conversion code?

  • And most of all, we have a huge amount of duplication in the Lucene backend, especially when it comes to types that are encoded as an Integer/Long internally. We should do something to re-use more code in these cases.

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Created December 11, 2018 at 3:35 PM
Updated January 31, 2019 at 3:08 PM
Resolved December 14, 2018 at 9:21 AM