[Zope-dev] KeyError on UnIndex.keyForDocument

Casey Duncan c.duncan@nlada.org
Mon, 1 Oct 2001 09:31:47 -0400


On Saturday 29 September 2001 04:29 pm, Chris McDonough allegedly wrote:
> Yeah, I could see this error being raised if you had just added an index
>   to use as the sort index and it didn't have all objects indexed within
> it yet...
>
> And yes, if this is what it is, it's a bug.  But it's structural and not
> operational... we need to think a bit about what it means to add an
> unpopulated index to an existing catalog.  Currently you just need to
> know that you must reindex the catalog.
>
> - C

What would the reaction be to changing this behavior. I have written some 
code that automatically populates the index when it is added. I personally 
think that reindexing every index just to populate one is grossly inefficient.

I wrote this single index update because of the DocumentLibrary product which 
performs real-time document format conversions when documents are indexed. 
With a catalog of more than 100 MSWord documents, It is glacial to update the 
entire catalog.

Although I have not put this code into a DocumentLibrary release yet, I would 
prefer to see it put directly into the catalog.

Whaddya think?

/---------------------------------------------------\
  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association
  c.duncan@nlada.org
\---------------------------------------------------/