RE: [Zope] Searching ZCatalog - sub-words?
Dieter, Thanks for the suggestion; I think I will likely use the regexes in UnTextIndex, but rewrite them using re, as Zope (as of 2.3.2) still uses Python 1.5.2's regex (I haven't looked at the 2.4.0 code yet, but since this is likely a radical change, I think I'll just implement a makeshift query parser using re). Sean -----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Sunday, July 08, 2001 2:55 PM To: sean.upton@uniontrib.com Cc: zope@zope.org Subject: Re: [Zope] Searching ZCatalog - sub-words? 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 _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
sean.upton@uniontrib.com