[Zope-dev] more on keyword indexes
Josh Zeidner
josh@brooklynmedialabs.com
Thu, 14 Dec 2000 22:33:28 -0500
Hello,
I did a little more investigiation into the problem, and couldnt really
find any documentation anywhere on what the actual semantics are of keywords
and how they are queried. For instance:
I have three classes and each has an keyword index named KW:
ObjectOne: KW = ['one','blue','furry']
ObjectTwo: KW = ['two','flying','purple']
ObjectThree: KW = ['three','one-eyed','purple']
If I were to query the ZCatalog with the following set of words:
['purple'] I would expect to get:
ObjectTwo
ObjectThree
Right? If I query the database with ['one','two'] ( if this type of thing
is at all possible ), I get :
ObjectOne
ObjectTwo
This seems like the obvious result: BUT: it depends if you want a AND/OR
type search. I could also expect to get nothing( if its an AND type search
because no records match 'one' and 'two' ). Here is better example, what if
I queried: ['purple','one-eyed']. Would I be expecting only ObjectThree or
[ ObjectThree, ObjectTwo ] ( because they both match the keyword purple( a
logical set-intersection ) ).
Also I found the keyword indexes to have some more obvious bugs. If I
only used one keyword for the matching critiria, for instance if I used
'purple' , I would only get ObjectTwo. Is anyone else using keyword
indexes? In what way are you using them?
Thanks,
Josh Zeidner
http://www.brooklynmedialabs.com