Subject: | Boolean Connectors |
Date: | Thu, 31 Jan 2008 17:46:24 +0100 |
To: | bug-Search-QueryParser [...] rt.cpan.org |
From: | Frank Wesemann <f.wesemann [...] fotofinder.net> |
Dear Maintainer,
in QueryParser-0.92
in line 397-398 the boolean connectors are evaluated through the RegEx
if (s/^($self->{rxAnd})\s*//) { $postBool = 'AND' } #( a AND followed
by a whitespace or not )
This leads the term "Prince Edward" to be parsed to:
$QUERY = {
'+' => [
{
'value' => 'Prince',
'op' => ':',
'field' => ''
},
{
'value' => 'dward',
'op' => ':',
'field' => ''
}
]
};
due to the spanish "E".
So shouldn't the regex in line 397 read
s/^($self->{rxAnd})\s+// # ( a AND followed by at least one whitespace )
?
best regards
--
mit freundlichem Gruß,
Frank Wesemann
Fotofinder GmbH USt-IdNr. DE812854514
Software Entwicklung Web: http://www.fotofinder.net/
Potsdamer Str. 96 Tel: +49 30 25 79 28 90
10785 Berlin Fax: +49 30 25 79 28 999
Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky