https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42835

--- Comment #4 from Pedro Amorim (ammopt) <[email protected]> ---
Created attachment 200315
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200315&action=edit
Bug 42835: Elasticsearch: Route availability and facets through items index

Queries the items index for availability filtering and item-level facets
(itype, location, ccode, homebranch, holdingbranch). Uses cardinality
sub-aggregations for per-biblio facet counts rather than per-item counts.
Adds biblionumber as an explicit integer field in the biblios index mapping
and stamps it on biblio documents so item facet queries can be scoped to
the current search result set via a _biblionumbers aggregation.

Fixes a bug where _apply_available_filter assumed available:true was always
at must[0]; now scans all must elements.

Fixes a bug where biblio_count{value} was tested for hashref truthiness
rather than key existence, always preferring it over doc_count.

Fixes the biblios index available field to correctly treat notforloan,
damaged, and withdrawn items as unavailable — previously only onloan and
itemlost were checked. Covers both item-level notforloan and items whose
item type has notforloan set. Updates existing tests in Elasticsearch.t
that were asserting the previous wrong behaviour.

Items index routing is unconditional here; the readiness gate that
prevents empty-index regressions on upgrade is added in the next commit.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to