On 2019-02-20 7:10 p.m., David Cook wrote: [snip]
2.mc-loc (from the “Shelving location” tab on /cgi-bin/koha/catalogue/search.pl) seems to be doing an incomplete search. That means if you have two locations like “Big Box” and “Big Box – Drawer”, “Big Box” will return items for both locations.
I fully agree -- this problem is getting very close to the top of my list of "things to fix". My analysis (so far) is very close to yours in that it's a question of getting the correct request in, and answer out of, Zebra, but while I am very happy with Zebra, I've never tried (yet) to play with it. Are you suggesting that this would require PERL changes? or can Zebra alone handle modifying a request at input time? Thanks and best regards, Paul
The reason for #2 is actually kind of interesting. While the RPN/PQF query is “@attr 1=8013 @attr 4=1 apple_street” and @attr 4=1 represents a “phrase” search, Zebra is actually using the “w” register and not the “p” register. It’s because of the “Completeness Attributes (type = 6)”:
“Incomplete subfield (1) is the default, and makes Zebra use register type="w", whereas Complete field (3) triggers search and scan in index type="p".” (https://software.indexdata.com/zebra/doc/querymodel-rpn.html).
If we wanted to actually just get the exact location, we’d want to use “mc-loc,complete-field”, but then we’d get Zebra errors because mc-loc doesn’t use the “p” type register currently, although that would be easy enough to add.
David Cook