[Zope] ZCTextIndex - prefix wildcards not supported?

Dieter Maurer dieter at handshake.de
Fri Nov 21 15:58:17 EST 2003


Small Business Services wrote at 2003-11-20 13:55 -0500:
 > ...
 > Is there any way/interest in having this '*term' type of wildcard searching
 > built into ZCTextIndex?

You can just remove the statement that raises the exception and see
what happens (with respect to runtime).


The standard way to support so called "left truncation" is to build
a mapping "R" "s.reverse() --> s" for each word "s" in your index.
With this map, "left truncation" can be mapped to "right truncation"
as you use your reversed pattern to scan through "R"s keys.

This still does not support truncation on both sides: to make this
efficiently, you need sub-word indexes.

-- 
Dieter



More information about the Zope mailing list