[Zope-CMF] How can I change the way text is indexed?

Dieter Maurer dieter@handshake.de
Fri, 24 Jan 2003 23:06:58 +0100


John Waycott wrote at 2003-1-23 20:13 -0700:
 > I need to make a change to the way the catalog indexes and looks up 
 > words on my CMF/Plone site. This is a stock CMF/Plone site with only 
 > some minor skin and workflow changes.
 > 
 > There are two issues:
 > 
 > 1. I need to index technical acronyms like "Q.931" or "X.25". The 
 > catalog seems to ignore these.
You must adapt the so called "splitter".
It is responsible to tokenize text into words.

Zope already comes with different splitters.
Look at them and especially how they are different and
make the adaptions you require.

 > 2. I want to change the default search to "and" words together instead 
 > of "or" them, so if I type "dial modem", it will behave like "dial and 
 > modem", rather than "dial or modem".
Look at the "operator" specification in modern (2.4+) ZCatalogs....
As already suggested, read the 2.6 Edition of the Zope Book (on Zope.org).


Dieter