Re: [Koha] Curious searching problem with zebra
You are absolutely right removing it would cause problems, but I don't suggest doing that, if you look at bug 5515 you will see I suggest we use something other than and for the directive perhaps +++ and then change build query to use that. People could still use ccl from the browser if they type ccl= but all other searches would be constructed by buildquery and would look like ti=the hobbit +++ au=tolkien. Which would mean ti=and simple +++ au=bob would work too. We might want to do the same with or and not. Hope this makes sense, typed on my phone while taking a break from christmas shopping. Merry christmas to your family Henri Damien, and to everyone else in the Koha family :) Chris On 18 Dec 2010 07:08, "LAURENT Henri-Damien" < henridamien.laurent@biblibre.com> wrote: Le 17/12/2010 18:17, Chris Cormack a écrit :
On 17 December 2010 23:46, LAURENT Henri-Damien <henridamien.laurent@biblibre.com> wrote:
Le ... mmm... removing and from ccl properties would break all the crossed searches... say I want Title=Stories and author=Poe and pb=Penguin Removing and from ccl.properties... would make it fail. Hope that helps. -- Henri-Damien LAURENT
Ona simple query, where you don't have ccl=, you could just chop 'and ' off the beginning and ' and' off the end of the query. I thought I could do it after line 1032 in Search.pm, but that didn't seem to work. Where does the debug output go? I'd like to see what Search.pm is doing. On 12/17/2010 06:24 PM, Chris Cormack wrote:
You are absolutely right removing it would cause problems, but I don't suggest doing that, if you look at bug 5515 you will see I suggest we use something other than and for the directive perhaps +++ and then change build query to use that.
People could still use ccl from the browser if they type ccl= but all other searches would be constructed by buildquery and would look like ti=the hobbit +++ au=tolkien. Which would mean ti=and simple +++ au=bob would work too. We might want to do the same with or and not.
Hope this makes sense, typed on my phone while taking a break from christmas shopping. Merry christmas to your family Henri Damien, and to everyone else in the Koha family :)
Chris
On 18 Dec 2010 07:08, "LAURENT Henri-Damien" <henridamien.laurent@biblibre.com <mailto:henridamien.laurent@biblibre.com>> wrote:
Le 17/12/2010 18:17, Chris Cormack a écrit :
On 17 December 2010 23:46, LAURENT Henri-Damien <henridamien.laurent@biblibre.com <mailto:henridamien.laurent@biblibre.com>> wrote:
Le ...
mmm... removing and from ccl properties would break all the crossed searches... say I want Title=Stories and author=Poe and pb=Penguin Removing and from ccl.properties... would make it fail. Hope that helps. -- Henri-Damien LAURENT
-- Bob
Le 18/12/2010 03:13, Bob Ewart a écrit :
Ona simple query, where you don't have ccl=, you could just chop 'and ' off the beginning and ' and' off the end of the query.
I thought I could do it after line 1032 in Search.pm, but that didn't seem to work.
Where does the debug output go? I'd like to see what Search.pm is doing.
Hi fwiw, debug output goes to apache error log set for your apache virtualhost. ususally koha-error_log in koha/var/log You should add SetEnv DEBUG 1 to your virtual host definition (if you are not using DebugLevel option. -- Henri-Damien LAURENT
Le 18/12/2010 00:24, Chris Cormack a écrit :
You are absolutely right removing it would cause problems, but I don't suggest doing that, if you look at bug 5515 you will see I suggest we use something other than and for the directive perhaps +++ and then change build query to use that. mmmm.... a) It seems to me that the problem would be the same for "or" and "not"
b) It would add some more "special" language to Koha... And I donot think Koha really needs that. (There are already many of them... ISBD, SQL reports) c) Problem would not occur if the operands would be carefully handled... Passing kw,wrdl="and simple" rather than kw,wrdl=and simple would do what is asked. zebra is a pain... But sometimes for good reasons. Z>.cclparse kw,wrdl=and test ^ - Search word expected Z> cclparse kw,wrdl="and test" @attr 4=6 @attr 1=1016 "and test" see here http://pastebin.com/4q38CPKq to check whether this is the desired behavior.
People could still use ccl from the browser if they type ccl= but all other searches would be constructed by buildquery and would look like ti=the hobbit +++ au=tolkien. Which would mean ti=and simple +++ au=bob would work too. We might want to do the same with or and not.
Hope this makes sense, typed on my phone while taking a break from christmas shopping. Merry christmas to your family Henri Damien, and to everyone else in the Koha family :)
Same to you and the whole Koha Community. -- Henri-Damien LAURENT
participants (3)
-
Bob Ewart -
Chris Cormack -
LAURENT Henri-Damien