[Zope3-dev] Re: [Zope3-checkins] SVN:
Zope3/branches/jim-index-restructure-2004-12/src/zope/index/
Updated IInjection to emphasize indexing of values (for documents),
Florent Guillaume
fg at nuxeo.com
Mon Dec 6 13:45:08 EST 2004
Jim wrote:
> Log message for revision 28574:
[...]
> -=-
> Added: Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/README.txt
> ===================================================================
[...]
> +Unindexing a document id that isn't present is ignored:
> +
> + >>> index.unindex_doc(8)
> + >>> index.unindex_doc(80)
> + >>> index.documentCount()
> + 8
> + >>> index.wordCount()
> + 7
Why? I'd rather have it raise a KeyError... Code that really knows that
it wants to ignore it can catch the exception. Other code that unindexes
a document it thinks is there should fail IMHO.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope3-dev
mailing list