[Zope-dev] NOT operator in Unindex.

Dieter Maurer dieter at handshake.de
Fri Sep 24 15:31:10 EDT 2004


Johan Carlsson wrote at 2004-9-23 13:24 +0200:
>I've been hacking FieldIndex and KeywordIndex to allow it to take the 
>operator not to exclude object that matches from the result.
>
>As it seems to me it would be possible to patch the Unindex with the 
>changes I've made.
>Is this something that could be added to the core?

I do not think that any index should index all documents.
For example, I like very much, that my "ManagableIndex"es
do not index objects whose value (with respect to the index) is "None"
(or matched by the "ignore" predicate).

Such indexes do not have enough information to implement
"NOT" by themselves (they would need the set of all catalogued
objects from the catalog).

I would not implement "NOT" at the index level (as I would not
implement "AND" or "OR" at this level).

   All logical operators should be implemented by the search engine
   and not by the individual indexes.

-- 
Dieter


More information about the Zope-Dev mailing list