[Bug 15198] New: Make OpacSuppression work even if there are no records suppressed
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Bug ID: 15198 Summary: Make OpacSuppression work even if there are no records suppressed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org At the moment, if you turn on OpacSuppression and try to search for records without having at least one record with 942$n = 1 indexed, you'll get zero results back. However, the special Zebra attribute 14 allows you to get around this problem. Attribute 14: "Specifies whether un-indexed fields should be ignored. A zero value (default) throws a diagnostic when an un-indexed field is specified. A non-zero value makes it return 0 hits." (http://www.indexdata.com/zebra/doc/querymodel-zebra.html) Now the description is a bit vague... you can't try something like "@attr 14=1 @attr 1=9999 1" to work. You'll still get a diagnostic error. However, you can try something like "@attr 14=1 @attr 1=9011 1" to work as 9011 is a valid use attribute in bib1.att. Anyway, by adding 14=1 to the Suppress qualifier in ccl.properties, we can make it so that OpacSuppression queries still work even when there are no suppressed records in Zebra. Cool, n'est-ce pas? No... it's not cool, but it's handy. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Unfortunately, I can't currently install the dependencies for master, namely Crypt::GCrypt which despite being marked as not required is required to even visit mainpage.pl, so I'll just be posting something here for someone else to do: -- ccl.properties: Replace: Suppress 1=9011 With: Suppress 1=9011 14=1 -- opac-search.pl: Replace: $query = '@not '.$query.' @attr 1=9011 1'; and $query = '@not '.$query.' @attr 1=9011 1'; #PQF syntax With: $query = '@not '.$query.' @attr 14=1 @attr 1=9011 1'; and $query = '@not '.$query.' @attr 14=1 @attr 1=9011 1'; #PQF syntax -- You'll need to test the opac-search.pl stuff, but I've already tested the ccl.properties change and it works a treat. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 44899 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44899&action=edit Bug 15198 - Make OpacSuppression work even if there are no records suppressed This patch adds the Zebra special attribute 14 to ccl.properties and opac-search.pl, so that we can turn on OpacSuppression and still return results even if there are no records in Zebra for the Suppress index. _TEST PLAN_ Before applying: 1) Make sure that you have no suppressed records indexed in Zebra 2) Turn on OpacSuppression system preference 3) Search using a keyword which should bring up records 4) Note that no records are returned in the results 5) Change UseQueryParser system preference to "Try" 6) Repeat steps 3-4 Apply the patch. After applying: 7) Repeat step 3 (ie search using a keyword which should bring up records) 8) Confirm that records are appearing in the results! 9) Change UseQueryParser system preference to "Do not try" 10) Repeat step 3 11) Confirm that records are appearing in the results! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44899|0 |1 is obsolete| | --- Comment #3 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 44901 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44901&action=edit [SIGNED-OFF]Bug 15198: Make OpacSuppression work even if there are no records suppressed This patch adds the Zebra special attribute 14 to ccl.properties and opac-search.pl, so that we can turn on OpacSuppression and still return results even if there are no records in Zebra for the Suppress index. _TEST PLAN_ Before applying: 1) Make sure that you have no suppressed records indexed in Zebra 2) Turn on OpacSuppression system preference 3) Search using a keyword which should bring up records 4) Note that no records are returned in the results 5) Change UseQueryParser system preference to "Try" 6) Repeat steps 3-4 Apply the patch. After applying: 7) Repeat step 3 (ie search using a keyword which should bring up records) 8) Confirm that records are appearing in the results! 9) Change UseQueryParser system preference to "Do not try" 10) Repeat step 3 11) Confirm that records are appearing in the results! Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. No more, won't need to have at least one record with the value "1" in the field mapped with this index. All records in OPAC returned. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hector.hecaxmmx@gmail.com, | |nengard@gmail.com Status|Needs Signoff |Signed Off --- Comment #4 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- I think, IMHO, you need to send another patch rewording the syspref OpacSuppression "Hide/Don't hide items marked as suppressed from OPAC search results. Note that you must have the Suppress index set up in Zebra and at least one suppressed biblio record, or your searches will be broken." I also add Documentation Manager -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Héctor Eduardo Castro Avalos from comment #4)
I think, IMHO, you need to send another patch rewording the syspref OpacSuppression "Hide/Don't hide items marked as suppressed from OPAC search results. Note that you must have the Suppress index set up in Zebra and at least one suppressed biblio record, or your searches will be broken."
I also add Documentation Manager
Yes, excellent point! I was thinking of that earlier today, but I totally forgot by the time I was writing the patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- I suppose some of the wording might be accurate... "att 9011 Suppress" does need to exist in bib1.att... but that's fairly obvious and it's a default. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- I suppose you also have to have Suppress in ccl.properties... but again that's a default. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Created attachment 44902 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44902&action=edit Bug 15198 - Change wording of OpacSuppression system preference -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dcook@prosentient.com.au --- Comment #9 from David Cook <dcook@prosentient.com.au> --- Marking this back to "Needs Signoff" for the second patch... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44902|0 |1 is obsolete| | --- Comment #10 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 44911 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44911&action=edit [SIGNED-OFF]Bug 15198: Change wording of OpacSuppression system preference Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Paragraph rewording successfully -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Very nice catch. I had seen this attribute type and had the same idea once (but then I forgot). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but this isn't working for me. I checked that no 942$n != "" existed in my database. I did a full reindex (-b -v -r). I checked that "de" returned results on master, then turned on OpacSuppression. As expected, the search did not return any results after. Applied patch. Search is still not returning any results. What could be wrong? something I can check? Running my git installation in Ubuntu 14.04 LTS. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- ... ok, I know what happened... ccl.properties... gah. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #13)
... ok, I know what happened... ccl.properties... gah.
It'll get you every time. Testing Zebra changes are a bit of a pain... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44901|0 |1 is obsolete| | Attachment #44911|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 44971 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44971&action=edit [PASSED QA] Bug 15198: Make OpacSuppression work even if there are no records suppressed This patch adds the Zebra special attribute 14 to ccl.properties and opac-search.pl, so that we can turn on OpacSuppression and still return results even if there are no records in Zebra for the Suppress index. _TEST PLAN_ Before applying: 1) Make sure that you have no suppressed records indexed in Zebra 2) Turn on OpacSuppression system preference 3) Search using a keyword which should bring up records 4) Note that no records are returned in the results 5) Change UseQueryParser system preference to "Try" 6) Repeat steps 3-4 Apply the patch. After applying: 7) Repeat step 3 (ie search using a keyword which should bring up records) 8) Confirm that records are appearing in the results! 9) Change UseQueryParser system preference to "Do not try" 10) Repeat step 3 11) Confirm that records are appearing in the results! Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. No more, won't need to have at least one record with the value "1" in the field mapped with this index. All records in OPAC returned. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 44972 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44972&action=edit [PASSED QA] Bug 15198: Change wording of OpacSuppression system preference Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Paragraph rewording successfully Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #18 from Liz Rea <liz@catalyst.net.nz> --- Does this also require an update to the system preference text, now that we don't require there to be one record marked suppressed? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 --- Comment #19 from Liz Rea <liz@catalyst.net.nz> --- oh my gosh. Reading failure. ignore me. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #20 from Liz Rea <liz@catalyst.net.nz> --- Pushed to 3.18.13, and released. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org