[Zope-dev] Zcatalog custom index/splitter woes

Harry Wilkinson harryw@nipltd.com
Wed, 08 Aug 2001 11:53:30 +0100


Hi all.

I've customised my own splitter, which works fine when using a standard
(non-globbing) lexicon.  I also have a customised index, which is
working fine.

A problem arises when I create a vocabulary that uses my splitter and
has globbing enabled.  When I do this, the vocabulary reports that it is
using my splitter and has globbing enabled, but when I index some things
it is evident from the contents of the vocabulary that it is using the
standard ZopeSplitter, not my splitter.

So far I've put a call to zLOG.LOG in the index_object method of my
custom index at the point where the splitter is acquired from the
lexicon ( splitter=lexicon.Splitter ) and the log entries are showing
two distinct splitters getting assigned when I index objects.  Here are
the log entries:

2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x8250218>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x88b1208>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon ;lexicon.Splitter = <Python Method object at
0x8250218>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x88b1208>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x8250218>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x88b1208>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x8250218>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x88b1208>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x8250218>
------
2001-08-08T10:15:30 INFO(0) PositionIndex.index_object; splitter
assigned from a lexicon; lexicon.Splitter = <Python Method object at
0x88b1208>

It looks like maybe my splitter is being assigned but then the default
splitter is overwriting it.

Anyone got any ideas on how I can fix this?  I''ll continue to
investigate but I'd appreciate any input :)

Thanks.

Harry