indexing multiple strings with ZCTextIndex broken in Zope 2.7.7
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
[Martijn Faassen]
The behavior of ZCTextIndex was intended to be able to index strings, but also lists of strings.
Note that there's a long discussion of this here: http://www.zope.org/Collectors/Zope/1815 Entry #31(!) claimed the patch "is also applied on the 2.7 branch since 2.7.7b1". If that's not so, probably best to reopen that issue.
Tim Peters wrote:
[Martijn Faassen]
The behavior of ZCTextIndex was intended to be able to index strings, but also lists of strings.
Note that there's a long discussion of this here:
http://www.zope.org/Collectors/Zope/1815
Entry #31(!) claimed the patch "is also applied on the 2.7 branch since 2.7.7b1". If that's not so, probably best to reopen that issue.
Thanks for pointing out the issue. It does not appear to be so, as the wrong behavior persists on Zope 2.7.7 and I couldn't find it on the Zope 2.7 branch. Can you reopen the issue? I've tried to log in to see whether I can, but it don't seem to log in properly into the tracker or something. Regards, Martijn
[Martijn Faassen]
The behavior of ZCTextIndex was intended to be able to index strings, but also lists of strings.
[Tim Peters]
Note that there's a long discussion of this here:
http://www.zope.org/Collectors/Zope/1815
Entry #31(!) claimed the patch "is also applied on the 2.7 branch since 2.7.7b1". If that's not so, probably best to reopen that issue.
[Martijn]
Thanks for pointing out the issue. It does not appear to be so, as the wrong behavior persists on Zope 2.7.7 and I couldn't find it on the Zope 2.7 branch.
Can you reopen the issue? I've tried to log in to see whether I can, but it don't seem to log in properly into the tracker or something.
I tried to reopen it, but unsure of the outcome. I can see the new entry via this URL: http://www.zope.org/Collectors/Zope/1815/ but not via this one: http://www.zope.org/Collectors/Zope/1815 (the difference is that the first has a trailing slash). If history is a guide, over time the difference in displayed content will go away.
Martijn Faassen wrote:
Can you reopen the issue? I've tried to log in to see whether I can, but it don't seem to log in properly into the tracker or something.
Zope.org appears to cache collector issues very aggressively; use the 'View' action on the top right to get to a fresher version. A bug I responded to this afternoon still shows up in it's originally filed state on the default URL (ending in the issue number) Martijn Pieters
participants (3)
-
Martijn Faassen -
Martijn Pieters -
Tim Peters