We're updating the issue view to help you get more done. 

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.

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Fix versions

Priority

Major