Handle .onMissingValue().use() properly for string fields in Lucene

Description

Lucene doesn't support sorting missing value as anything else than "first" or "last" for the STRING and STRING_VAL types. Currently we just let Lucene throw an exception whenever the user calls onMissingValue().use( ... ) on such type.

We should at the very least throw our own exception like we used to in Search 5 (see org.hibernate.search.query.dsl.sort.impl.SortFieldStates#processMissingValue).

Ideally we should support it instead of failing. It would require implementing our own sorting mechanism for strings, though; not sure it's worth it.

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major