Chris Thanks, That makes much more sense. Still not sure how you could make it work due to previously mentioned 'hardcoding' but the theory sounds spot on. -Andy Chris Withers wrote:
Andreas Jung wrote:
aquires the Splitter from the corresponding Lexicon. Currently there is no official way to make Splitters available only to dedicated components.
I think the opposite is true, Splitters and Volcabularies seem to be limited to only being used by TextIndexes within PlugginIndexes. I just put a bug in the collector about one aspect of this.
I think Vocabularies might be generically useful in Zope, not just to ZCatalog, likewise splitters.
I'd love to be able to do:
context.mySplitter.split('the quĂck brown f0x')
...for example.
But, it does seem exraordinarily hard to register new types of splitter. Currently, the only way I can think to do it would be something like:
import MySplitter
from Products.PluginIndexes.TextIndex import Splitter
aS = Splitter.availableSplitters # why isn't availableSplitters a dictionary?! aS = aS + ("MySplitter","My Special Funky Splitter") Splitter.availableSplitters = aS
# worse still... setattr(Splitter,'MySplitter',MySplitter)
...and I'm not even sure that'd work :(
Maybe Vocabularies should be in their own Product and maybe (although maybe not) Splitters and Lexicons should be in their own Products too?
cheers,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )