[Koha-bugs] [Bug 10542] QueryParser + OpacSuppression doesn't allow search in 'all libraries'

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 17 10:08:04 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10542

--- Comment #13 from David Cook <dcook at prosentient.com.au> ---
I'm looking again at this example:

 prefixQuery("@and complete @or dinosaur pterosaur");
    CCLQuery("complete and (dinosaur or pterosaur)");

And considering the PQF grammar:

PQF Grammar

    complex ::= operator query-struct query-struct.

http://www.indexdata.com/yaz/doc/tools.html#PQF

If it is "reverse polish notation" (ie RPN)...

Then the following:

@not 
@or
@or
@or 
@attr 1=1016 @attr 5=1 @attr 4=6 "e" 
@attr 9=75 @attr 2=102 @attr 5=1 @attr 4=6 "e" 
@attr 9=20 @attr 2=102 @attr 5=1 @attr 4=6 "e" 
@attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "e" 
@attr 1=9011 1

Becomes:

@attr 1=1016 @attr 5=1 @attr 4=6 "e" 
@not 
@attr 9=75 @attr 2=102 @attr 5=1 @attr 4=6 "e" 
@or
@attr 9=20 @attr 2=102 @attr 5=1 @attr 4=6 "e" 
@or
@attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "e" 
@or 
@attr 1=9011 1

OR 

kw,wrdl,rt=e and not (kw,wrdl,rt=e or (kw,wrdl,rt=e or (kw,wrdl,rt=e or
suppress=1)))

Well...there is also relevance ranking in there but I got lazy...

I'm not sure how to make the query structure into:

(kw,wrdl,rt=e or kw,wrdl,rt=e or kw,wrdl,rt=e or kw,wrdl,rt=e) and not
(suppress=1)

I know you can do grouping with CCL but how that works with PQF...I have no
idea.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list