Bug 38741 - define a secondary sort order for searches where primary sort field matches for several results
Summary: define a secondary sort order for searches where primary sort field matches f...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-18 12:21 UTC by Jake Bateman
Modified: 2024-12-20 11:50 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Bateman 2024-12-18 12:21:00 UTC
When several search results are returned whose relevance and defaultSortOrder field match (a series with many volumes with the same publication date, in my case), it would be desirable to have these results ordered by some deliberately chosen field, or by a sensible default (title alphanumeric desc would I think would be correct in all cases, potentially negating the need for an additional syspref). In my testing (with Elasticsearch), I believe the current secondary sort order to be [biblionumber asc, plus some randomness from a race condition introduced by the multiple concurrent processing threads used by the Elasticsearch reindex task, if multithreading was used].
Comment 1 Jake Bateman 2024-12-19 09:55:27 UTC
screenshots of an example search with records in semi-random but almost biblionumber order

https://imgbox.com/muwIxR4O
https://imgbox.com/TO0X2pYG
Comment 2 Katrin Fischer 2024-12-19 21:15:05 UTC
I thought we had fixed the biblionumber not sorting numerical... but maybe not? I remember the intention to use it as the second sort criteria and I think we would like that as an option at least. It would allow to put the newest (highest biblionumber) first.

Which version are you testing with?

There is also:
Bug 23875 - Elasticsearch - When sorting by score we should provide a tiebreaker