[Zope-CMF] Re: TextIndex -> ZCTextIndex
Florent Guillaume
fg at nuxeo.com
Tue Jul 27 09:12:36 EDT 2004
In article <4100E0DB.60701 at simplistix.co.uk> you write:
> Casey Duncan wrote:
> > from Products.ZCTextIndex.ZCTextIndex \
> > import PLexicon, ZCTextIndex, OkapiIndex
> >
> > zcti = ZCTextIndex('SearchableText',
> > caller=self,
> > index_factory=OkapiIndex,
> > field_name=name,
> > lexicon_id='lexicon')
> > self._catalog.addIndex(name, zcti)
> >
> > And if you need to add a lexicon:
> >
> > lexicon = PLexicon('lexicon', '', HTMLWordSplitter(), CaseNormalizer())
> > self._setObject('lexicon', lexicon)
> >
> > No big deal if you ask me.
>
> Indeed. Where's this documented? It certainly isn't obvious from reading the
> ZCTextIndex source and I just ended up copying from Plone which does:
The unit tests are often a good start.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg at nuxeo.com
More information about the Zope-CMF
mailing list