[Yazlist] pazpar2 issue with queries including brackets

Adam Dickmeiss adam at indexdata.dk
Fri Nov 5 12:27:53 CET 2010


On 2010-11-03 12:48, Porst, Sven wrote:
> There seems to be an issue in pazpar2's way of tokenising search query
> strings.
>
> When entering a query containing a bracket and text following it, e.g.
>
> ')a' or '(a' or '(test) a'
Use double-quotes ("") rather than single-quotes (') for verbatim text.

adam at durum:~/proj/yaz/util$ ./cclsh
CCLSH>')a' or '(a' or '(test) a'
        ^ - Unbalanced ')'
CCLSH>")a" or "(a" or "(test) a"
First:
@or
  @or
   )a
   (a
  "(test) a"



> (where the latter one comes from a practical example of copying and
> pasting a title which contains brackets, while the first two are reduced
> versions), the query, forwarded to search.pz2 results in a 417
> (Malformed parameter value) error.
>
> I suspect that this may be caused by an inappropriate error code being
> set in ccl_parser_find_token in that situation.
>
> The code of that function contains the somewhat mysterious line
>
>          cclp->error_code = cclp->error_code;
Yes. Is executed and is harmless. But redundant. We'll remove it. Good spot.

/ Adam
> which is executed in this situation. Perhaps something's going slightly
> wrong there.
>
> Best
>
>          Sven
>




More information about the Yazlist mailing list