Indeed we should use SortedNumericDocValuesField. This is planned for some future Beta of Hibernate Search 6, see HSEARCH-3103 Open . At the moment we have internal metadata to let us know that a given field is multi-valued or not, but we don't use it. We should use the metadata to pick the correct field type at indexing time, and maybe to build sorts differently at query time (I suppose we have to pick between min/max/avg/etc. when there are multiple values for a single document). We'll get there eventually; if you need this soon and can spend some time on this, we will gladly accept a contribution! |