[Koha-bugs] [Bug 11232] Retrieve facets from Zebra
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Sep 8 15:35:01 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11232
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #31435|0 |1
is obsolete| |
--- Comment #57 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 31459
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31459&action=edit
Bug 11232: retrieve facets from Zebra's indexes in DOM
This patch adds the following routines to C4::Search
- GetFacets
This is a wrapper routine, that given a ZOOM::ResultSet, extracts
the relevant facets. To do the job, it uses the internal functions:
_get_facets_from_records and _get_facets_from_zebra. The choice is done
on querying the indexing mode: grs1 will use records, and dom zebra's
facets.
- _get_facets_from_records
Just refactoring the already existent main loop from getRecords into a
function.
- _get_facets_from_zebra
Given a result set, loop through all defined facets in C4::Koha::getFacets
and call _get_facet_from_result_set for each, to build the facets
information. It retrieves the facets from Zebra's facets.
- _get_facet_from_result_set
Given a result set and a facet index name, retrieve the facets
for the given index, and build the result for rendering.
To test this preliminay work:
- Apply the patches, install on DOM, using MARC21, NORMARC and UNIMARC.
- Reindex some DB with lots of records.
- Check facets work.
Note: UNIMARC is the only dialect that has more than one subfield
(concatenated)
for facets values, so it is better to test on uNIMARC. The approach leaves room
for re-thinking facets in MARC21/NORMARC, but it is outside of the scope of the
bug
(e.g. we could have more author facets)
Sponsored-by: Universidad Nacional de Cordoba
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list