[Zope] Searching ZCatalog - sub-words?

Dieter Maurer dieter@handshake.de
Sun, 8 Jul 2001 23:55:25 +0200 (CEST)


sean.upton@uniontrib.com writes:
 > ....
 > I guess what I am wondering is if there is a way to search with sub-words
 > without explicit use of wildcards?  That is to say, provide a default option
 > (perhaps something that could be disabled with a simple checkbox in the
 > quick search form) that automatically searches using sub-words, so that a
 > search for engineer was actually rewritten as a search for "engineer*"
 > instead.  I suppose that one could rewrite
 > REQUEST['nameOfIndexToBeSearched'] prior to <dtml-in Catalog> to achieve
 > those results, but I am wondering if there might be a simpler solution?
With Zope 2.4's pluggable indexes, you may have a special
index that can do sub-word searches automatically.

With Zope 2.3, I fear you need to rewrite the subquery.
I would steal the "UnTextIndex"'s parsing code to
find the words and add '*' as necessary.


Dieter