In HSEARCH-1872, a sort DSL is being introduced. This DSL will have to be extended with elements that were excluded from the initial work (caution, some ideas are yet to be validated):
* a {{withComparator()}} method for building a sort that will use a java.util.Comparator * a {{treatMultiValuedAs(mode)}} method for instructions about how multi-valued fields should be sorted. * a {{byNative()}} method for injecting implementation-dependent sorts inside a DSL-built sort (such as a JSON string for ElasticSearch, or a SortField for a local Lucene index) * a {{onMissingValue()}} method for distance sort (at least first/last as for field sorts, or even substitue value if possible) * a {{withComputeMethod()}} method for distance sort * a {{byDistanceFromSpatialQuery(Query)} } method for distance sort
Emmanuel Bernard had started working on some of these subjects, and this work had to be reverted in order to reduce the scope. Please find tags for those reverts below. The idea is that if you revert the reverts, you'll end up with a start of an implementation.
* https://github.com/yrodiere/hibernate-search/releases/tag/HSEARCH-2320-distance-withComputeMethod-torevert * https://github.com/yrodiere/hibernate-search/releases/tag/HSEARCH-2320-withComparator-torevert * https://github.com/yrodiere/hibernate-search/releases/tag/HSEARCH-2320-distance-onMissingValue-torevert * https://github.com/yrodiere/hibernate-search/releases/tag/HSEARCH-2320-treatMultiValuedAs-torevert * https://github.com/yrodiere/hibernate-search/releases/tag/HSEARCH-2320-distance-byDistanceFromSpatialQuery-torevert
See HSEARCH-1872 for hints on use cases (they might not all be defined). |
|