[ZCM] [ZC] 1616/ 1 Request "ZCTextIndex fails to index multiple fields"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed Dec 8 19:08:26 EST 2004


Issue #1616 Update (Request) "ZCTextIndex fails to index multiple fields"
 Status Pending, Catalog/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/1616

==============================================================
= Request - Entry #1 by iclelland on Dec 8, 2004 7:08 pm


Uploaded:  "ZCTextIndex.py.patch"
 - http://collector.zope.org/Zope/1616/ZCTextIndex.py.patch/view
When a ZCTextIndex is created with multiple indexed attributes, it does not count the words in any of the attributes when indexing objects.

The CVS change log shows that this feature was added, then removed, then added again on 2 Feb 2003, but it appears to have never worked in any case (the index_doc() method doesn't work the way the index_object method expects it to).

I've incorporated the attached patch into my local zope instance, and it appears to work correctly under all of the circumstances I've tried it under.

In this version, the index_object and _index_object methods have been recombined, and the new index_object method works by joining all of the referenced fields into a single long string and then passing that string to index_doc for lexing.
==============================================================



More information about the Zope-Collector-Monitor mailing list