Make byField(String) in the sort DSL automatically determine the sort type for metadata providing field bridges

Description

Currently the API doc tells user to use byField(String, SortField.Type). But in the particular case of MetadataProvidingFieldBridge, we may have enough information to know what type of sort to use, or at least to guess a decent default.

The idea would be, in org.hibernate.search.query.dsl.sort.impl.SortFieldStates.getCurrentSortFieldTypeFromMetamodel(), to use typeMetadata.getBridgeDefinedFieldMetadataFor( sortField.getAbsoluteName() ) to retrieve the metadata of the bridge-defined field, and use this metadata to guess the sort type.

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Fix versions

Priority

Major
Configure