Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2588

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.0.Final
    • Component/s: None
    • Labels:
      None

      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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                yrodiere Yoann Rodière
                Reporter:
                yrodiere Yoann Rodière
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: