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).
Maybe 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. |
|