Bug 10542: QueryParser + OpacSuppression doesn't allow search in 'all libraries'
authorDavid Cook <dcook@prosentient.com.au>
Mon, 21 Jul 2014 23:26:03 +0000 (09:26 +1000)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 11 Aug 2014 14:39:24 +0000 (11:39 -0300)
commit6768c2874bcb11fc8cf7e155e7686ea7eaa8858d
tree433692b8463091addf3ef42cafccbcd0d3a1ee84
parent449b365a4822141920706d61a5ca466a86e6a6fa
Bug 10542: QueryParser + OpacSuppression doesn't allow search in 'all libraries'

Since we're using the $query_type variable to detect if this pre-built
query is PQF, we need to use PQF syntax (rather than QueryParser
syntax) when adding to the query. I've made a lot of notes of somewhat
incoherent notes on Bugzilla talking about PQF, CCL, and QP syntaxes,
but I'm hoping to refine these notes on a wiki page for future
reference.

_TEST PLAN_

1) Set 'Suppress in Opac' (ie 942$n) to 1 for one record
2) Re-index Zebra
3) Set 'OpacSuppression' to 'Hide'
4) Set 'UseQueryParser' to 'Do not try'
5) In the staff client, do a search that will return that suppressed
record as well as a few records that are NOT suppressed
6) Note that you can return that suppressed record in the staff client
7) Do the same search in the OPAC
8) Note that the suppressed record doesn't appear
9) Set 'UseQueryParser' to 'Try' && re-run the OPAC search
10) Note that no results appear (the logs will probably mention a
ZOOM error)

11) Apply patch

12) Re-run the OPAC search
13) Note that the suppressed record doesn't appear, and that the
not suppressed records are showing (it's important that you are
getting some results...as ZOOM errors are silent in the UI).
14) Set 'UseQueryParser' to 'Do not try'
15) Re-run the search
16) Note that the suppressed record doesn't appear, and that the
not suppressed records are showing

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described following test plan.
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - hidden records are hidden.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
opac/opac-search.pl