More sorting options #1225
Labels
good first issue
Good for newcomers
pg_search
Issue related to `pg_search/`
priority-2-medium
Medium priority issue
user-request
This issue was directly requested by a user
What
The default sorting for "pg_search" is always BM25 scoring. In general, relevance is of course the first and most important sort. However, our users have expressed a desire for further sorting, e.g. by timestamp . This means showing all content with the search terms, but then by timestamp and not by relevance.
Why
This does not work optimally at the moment because there is no additional sorting field. Even if the TIMESTAMP field e.g. "stamp" is available in the index, I cannot use it for sorting. This means that I have to search the entire index first in order to re-sort with ORDER BY. The performance is not optimal for many sessions.
How
The ability to add a custom sort order. Any field that is also defined in the index should be able to be used as a sort field. Elasticsearch does this as well.
The text was updated successfully, but these errors were encountered: