[Zope-CMF] Searching portal_catalog using wildcards or regexp
Tres Seaver
tseaver@zope.com
14 Nov 2002 14:35:19 -0500
On Thu, 2002-11-14 at 13:20, Kevin Carlson wrote:
> Thanks, Chris. This works fine. I am curious as to whether or not the
> catalog will support regular expression searching in the future since adding
> a new index to the catalog each time we want to program a new search method
> seems a bit cumbersome. I understand the overhead involved with regexp --
> even something similar to a LIKE operator in SQL would be nice. Thoughts
> anyone?
FieldIndexes and KeywordIndex are designed / optimized for exact match
searches; they won't ever grow any "globbing" features. Text indexes
(the ur-TextIndex of Zope 2.x, x<6, ZCTextIndex, or TextIndexNG) can
potentially support such queries. For the ur-TextIndex, it would
suffice to pass a GlobbingLexicon at construction time to the index;
that index would then support 'foo*'-style queries. ZCTextIndexes
support globbing by default. I don't know what TextIndexNG requires to
enable globbing support, if anything.
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com