Bug 25028

Summary: The not-onloan-count index is not used in ES
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 - low CC: anne-cecile.bories, e.betemps, fridolin.somers, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26487
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25375
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25030
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Tomás Cohen Arazi 2020-03-31 15:13:38 UTC
The code in Koha::SearchEngine::Elasticsearch::QueryBuilder::_fix_limit_special_cases only sets onloan:false on the query if the availability limit is passed.

This is not (a) matching the Zebra behaviour and (b) it should be using the not-onloan-count index (which is configured) but as the indexer is feeded with the output from GerMarcBiblio as-is, it wouldn't include 999$x as the rebuild_zebra.pl counter part does, using the RecordProcessor filters.

Looking at rebuild_zebra.pl and the fact that ES doesn't use the EmbedSeeFromHeadings filter either, probably more bugs should be filled.

I'm possibly missing some more magic on the QueryParser code that could deal with this things in a different way (than Zebra). But the availability one looks plain wrong so worth filing this bug.
Comment 1 Fridolin Somers 2021-11-20 07:42:04 UTC
> Looking at rebuild_zebra.pl and the fact that ES doesn't use the EmbedSeeFromHeadings filter either, probably more bugs should be filled.

This was fixed in Bug 25030