You are not logged in Log in Join
You are here: Home » Members » Torped » EasyIndexes

Log in
Name

Password

 
 

Folder icon EasyIndexes

Easy Keyword Index

This is a extention to the regular Keyword Index, which doesn't provide a NOT operator.

Easy Keyword Index adds three operators, not, notor, and notand.

  • not and notor are equivilent and first resolves any range operators, then make a union (or) of the result, and at last inverts the result set so that all documentIds that are not in the Union are returned.
  • notand, first resolves any range operators, then intersects (and) the results, and last inverts the result list.

The Easy Keyword Index make one additional modification to the Keyword Index, namely it doesn't index documents (object) which doesn't have an attribute (of the same name as the index) or if that attribute returns None (either directly or the method returns None).

This is (as often with my contributes) not a final product, merely a proposal of what should be in the ZCatalog core.

Any comments may be sent to [email protected] and me [email protected] (I can mis any mail to [email protected] because I occational can be quite busy).

Use Case

The reason why I need this is because I am refactoring the ZBabel-product and need a way to return all messages that has not been translated yet. Because I have thrown out the SQL-parts of the original ZBabel product and replaced it with a ZCatalog I needed a possiblilty to index all translated languages and return any that didn't have the translated in that index.

Combining the index with a generic tags-index I can get exactly those untranslated part of a web-site or Zope products that I like to translate.

 Title   Type   Size   Modified   Status 
 EasyIndexes Edit object Software Release   2002-07-06 published
 Usage Edit object Document 1 K 2002-07-06 published