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