Summary: | OpacHiddenItemsHidesRecord system preference should be considered on index time instead | ||
---|---|---|---|
Product: | Koha | Reporter: | Pedro Amorim <pedro.amorim> |
Component: | Searching | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | alexander.blanchard, chris.rowlands6, dcook, jacob.omara, jonathan.field, martin.renvoize, matt.blenkinsop, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24403 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
Description
Pedro Amorim
2023-10-13 14:33:53 UTC
I actually see two ways to achieve this.. a) we add a field to the index to denote hidden by these options and fill it during index runs. or b) we adapt the queries at runtime with each search to take into consideration the preferences for b) I think we need to begin indexing the items individually, right now we take the values from each, but the connections are broken. i.e. homebranch index gets the list of homebranches on the item holdingbranch the same We cannot search for records with items with matching homebranch and holdingbranch, only records that have some items in a homebranch and some items in a holdingbranch I recall Frido and I talking about this on a separate bug but now I can't remember which one it was... One problem with indexing whether or not to hide based on OpacHiddenItems and OpacHiddenItemsHidesRecord is that you'd need to do a full reindex for any change to OpacHiddenItems or OpacHiddenItemsHidesRecord. (Of course, if we note that caveat in the syspref descriptions, then it's not necessarily a huge problem.) Unless we re-use the index used by OpacSuppression, then we'll need to adapt the search queries to take into account a new OpacHiddenItems index as well. -- As Nick says, I don't think just updating the search query is enough, since I don't think there's any way to know if all the items in a record should be hidden in Zebra. In bug 19704, I'm able to generate a SQL query using OpacHiddenItems, but it's able to deal with individual item records. That said, I don't think we can index items separately in Zebra and there wouldn't be any way to join the bibs and items together anyway. So I think that really just leaves the indexing option? |