http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10542
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #25 from David Cook <[email protected]> --- I realized last night after getting off IRC that I forgot to mention that we would need to use PQF syntax rather than QP syntax, if using the $query_type to know what type of query we're working with. The following syntax would have to be used "before" buildQuery/parseQuery, as this is QueryParser syntax which is parsed and then transformed into PQF. $query = "($query) && -(suppress:1)" Since the latest patch is adding the OpacSuppression after the query has already been returned from buildQuery as PQF, we need to use the following PQF syntax: $query = '@not '."$query".' @attr 1=9011 1'; -- Otherwise we generate an invalid query that will return 0 records when using QueryParser: ZOOM error 20003 "can't set prefix query" (addinfo: "(@or @or @or @attr 1=1016 @attr 5=1 @attr 4=6 "test" @attr 9=75 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 9=20 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "test") && -(suppress:1)") from diag-set 'ZOOM' -- We also can't use parentheses as those aren't used in PQF either. ZOOM error 20003 "can't set prefix query" (addinfo: "@not (@or @or @or @attr 1=1016 @attr 5=1 @attr 4=6 "test" @attr 9=75 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 9=20 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "test") @attr 1=9011 1") from diag-set 'ZOOM' -- The following query will work as expected though: @not @or @or @or @attr 1=1016 @attr 5=1 @attr 4=6 "test" @attr 9=75 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 9=20 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "test" @attr 1=9011 1 I had to look over those past comments of mine to make sure but if this were CCL it should look like this: (((kw,wrdl,rt=test OR kw,wrdl,rt=test) OR kw,wrdl,rt=test) OR kw,wrdl,rt=test) NOT suppress=1 -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
