[Zope-dev] SearchIndex: is this behaviour in 2.4?

Erik Enge erik@thingamy.net
Mon, 4 Jun 2001 12:18:58 +0200 (CEST)


Hi,

sorry I can't test this myself.  I get this behaviour in 2.3.2, and I find
it strange.  I'd classify it as a bug.

If I pass this query to a TextIndex:

  (word1 OR word2) AND (word3)

it is first translated to this:

   [['word1', 'or', 'word2'], 'and', ['word3']]

which is fine.  But then, after query_hook() in GlobbinLexicon.py:

   [['word1', 'or', 'word2'], ['word3']]

and then the default_operator (Or) is used (by parse2()/query() in
UnTextIndex.py, I think), and turns it into:

   [['word1', 'or', 'word2'], 'or', ['word3']]

kinda not what I wanted.  Since I always use parens around OR's I can just
set the default_operator to And and this solves my problem, but it's still
not working correctly.

Is this fixed in Zope 2.4?