[prev in list] [next in list] [prev in thread] [next in thread]
List: zope
Subject: [Zope] ZCTextIndex Lexicon problems
From: "Jonathan Hobbs" <toolkit () magma ! ca>
Date: 2004-09-30 0:25:00
Message-ID: 040001c4a683$ed0b8be0$647ba8c0 () jhdesktop
[Download RAW message or body]
I have bulk uploaded about 100k records (zclass instances) into a
BTreeFolder2 and am using the following code to create entries in a zcatalog
(I am not using catalog-aware instances):
import os, sys, traceback
import Zope
app=Zope.app()
from Testing import makerequest
app = makerequest.makerequest(app)
for item in app.sw.WebSitesFolder.WebSitesData.objectItems():
uid = item[0]
obj = item[1]
app.sw.WebSitesFolder.Catalog.catalog_object(obj, uid)
if cnt == 1000:
get_transaction().commit()
cnt=0
get_transaction().commit()
This works if I only have about 10k entries in the BTreeFolder2
(WebSitesData), but when I have larger volumes of records the Lexicon
doesn't work: ie. 0 ( yes, 'zero') entries in the Lexicon, but no errors.
The zcatalog contains the correct number of entries, but when you try to
access a record in the zcatalog (via the ZMI) you get the following error:
Traceback (innermost last):
Module ZPublisher.Publish, line 98, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Shared.DC.Scripts.Bindings, line 252, in __call__
Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
Module App.special_dtml, line 174, in _exec
Module DocumentTemplate.DT_In, line 628, in renderwob
Module DocumentTemplate.DT_Util, line 201, in eval
- __traceback_info__: rid
Module <string>, line 0, in ?
Module Products.ZCatalog.ZCatalog, line 572, in getIndexDataForRID
Module Products.ZCatalog.Catalog, line 441, in getIndexDataForRID
Module Products.ZCTextIndex.ZCTextIndex, line 193, in getEntryForObject
Module Products.ZCTextIndex.Lexicon, line 92, in get_word
KeyError: 1965
The zclass instances in the BTreeFolder2 (WebSitesData) are ok (ie. you can
examine them via the ZMI and all the fields are displayed as expected).
Has anyone encountered this situation???
Thanks in advance,
Jonathan
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic