On Feb 16, 2006, at 6:49 AM, Sasha Vincic wrote:

I have made my own i keyword index, it works fine when only querying it
but if I query an other index in the same query I get an error.

MyKeywordIndex.apply() returns what
zope.index.keyword.KeywordIndex.search() returns

this is the values that cause the error:
[(3, BTrees._IFBTree.IFBucket([(1, 0.15151515603065491), (8,
0.15151515603065491),
(12, 0.15151515603065491)])), (4, IISet([1, 6, 8, 12]))]

Traceback:
     ...
        result = catalog.apply( query )
File "/Applications/Zope-3.2.0/lib/python/zope/app/catalog/ catalog.py",
line 100, in apply
        _, result = weightedIntersection(result, r)
    TypeError: invalid argument

That IISet won't work. I have no idea why your index put it there, but it need to be a float to use weightedIntersection.

I'm curious as to why the SetIndex in zc.catalog was not generic enough to do whatever you need. It already has tests and has been used successfully for some time now.

Gary

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to