[Zope-dev] Re: Escaping special characters in
ZCTextIndex.QueryParser?
Robert Casties
casties at mpiwg-berlin.mpg.de
Tue Nov 27 03:47:56 EST 2007
Dieter Maurer wrote:
> Robert Casties wrote at 2007-11-25 19:32 +0100:
>> is it possible to escape parentheses in ZCTextIndex searches?
>>
>> If not, why not and how can I do a simple search in an index bypassing
>> the QueryParser?
>
> I fear nobody of us knows this.
>
> Therefore, you must yourself look at the sources.
I had a quick look at the QueryParser source before but it wasn't
obvious to me. I will have a deeper look again.
> If you need this feature and "ZCTextIndex" does not provide
> it, then you may use a different text index.
> I know that with "TextIndexNG3" you can select different
> parsers (among others a parser that does not interpret '(' and ')')
> or provide your own one.
Is the parser for the search query also pluggable? I will have another
look at TextIndexNG.
>> I have an index where words can contain parentheses and I am unable to
>> enter a query for these words because the QueryParser interprets all
>> parentheses as search expression groupings.
>
> Then, you will need to change the lexicon as well.
> Usually, the lexicon breaks words at non alnum characters
> (with a few exeptions).
I have my own splitter for the Lexicon so I think the right words are in
the index but I haven't been able to check because I can't search the
index...
Thanks
Robert
More information about the Zope-Dev
mailing list