[Zope-dev] indexing multiple strings with ZCTextIndex broken in Zope 2.7.7

Martijn Faassen faassen at infrae.com
Thu Sep 1 07:08:14 EDT 2005


Hi there,

The behavior of ZCTextIndex was intended to be able to index strings, 
but also lists of strings. The list of strings construction is useful in 
case one wants to index multiple pieces of text without generating 
patterns that aren't really there:

['foo bar', 'qux baz']

but we don't want 'bar qux' to be a pattern.

Zope 2.7.7 appears to break this behavior due to a change in 
index_object in Products/ZCTextIndex/ZCTextIndex.py, and only accepts 
strings, not lists of strings anymore. The underlying indexing code is 
however capable of dealing with lists of strings.

This problem has evidentially been broken and fixed on the Zope 2.8 
branch, but remains on the Zope 2.7 branch. This comment is also present 
on Zope 2.8:

         Enter the document with the specified documentId in the index
         under the terms extracted from the indexed text attributes,
         each of which should yield either a string or a list of
         strings

Are there plans for a Zope 2.7.8 that fixes this? The Zope 2.7 branch in 
CVS still appears to be broken.

Regards,

Martijn


More information about the Zope-Dev mailing list