[Koha-bugs] [Bug 13665] Retrieve facets from zebra is slow

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 25 05:03:08 CEST 2022


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

--- Comment #10 from David Cook <dcook at prosentient.com.au> ---
(In reply to Tomás Cohen Arazi from comment #9)
> David, whlie you're digging that hole... One of the problems for the facet
> retrieval step in Koha is that we look through the defined facets instead of
> fetching them all at once.
> 
> The reason behind that is that if some facet is not populated at all (i.e.
> no record has field X which is mapped to the facet) then the resultset is
> always empty in Zebra. I filed an issue about that (a lot of time ago) but
> the answer was negative: that's the expected behavior.

Yeah, I've been thinking a little bit about that as well, although I didn't
look at the code for that. I think that's probably handled within the
facet_fetch() function. 

I do wonder if they'd be interested in adding the "14" attribute to the
faceting as well.

(https://software.indexdata.com/zebra/doc/querymodel-zebra.html#querymodel-zebra-attr-search)

Adam is out of the office this week, but I'm hoping that he'll help me to
understand the faceting code. 

> So, would it be possible to add some ghost record (e.g. ID = -1) with all
> the fields (one space or special character?) so we convert it into one query
> instead of many?

I think that might be an option. 

When I run zebrasrv in this directory
https://github.com/indexdata/idzebra/tree/master/examples/marcxml, I noticed
that there were records that weren't indexed and records that seemed to have
empty indexes. 

In theory, we could add a record to Zebra like you describe, but I haven't
tested it in practice. 

--

I wouldn't mind looking at trying to fetch the facets asynchronously although
that's less pressing for me atm...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list