[Zope] no 'operator' query option with zctextindex?

Richard Ettema richard.ettema@yoursolutions.com
Thu, 17 Jul 2003 13:20:24 +0100


Hi,

I'm currently upgrading a site to run on 2.6.1 (previously 2.5.1). I have
been testing the search facility with textindex replaced with zctextindex.

ZCTextIndex Settings:
1. Okapi BM25 Rank
Lexicon Settings:
1. Splitter
2. CaseNormalizer
3. StopWordAndSingleCharRemover

If I do a search on the text 'bike helmet' (without quotes) I would like any
item with the word 'bike' or 'helmet' to be returned. (An 'OR' search by
default). The user has the ability to choose a drop-down for "any words" or
"all words" to over-ride the default to an "OR" or "AND". This passes the
chosen 'operator' to the catalog with {'query':'bike helmet',
'operator':'or'}.
ZCTextIndex only returns items matching the whole phrase "bike helmet", the
original textindex worked fine by matching the individual words.

I have found in zctextindex.py the query options available is only the
'query'. Is there a reason why zctextindex doesn't allow an operator to be
passed like textindex? TextIndex was working fine, I am interested in using
ZCTextIndex for its improved relevance scoring.

Also a question about the relevance scoring. Is the relevance score of
returned items available in the results, or something to pass to make them
available?

Thanks for your help with this.

Richard
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.493 / Virus Database: 292 - Release Date: 25/06/03