[Zope] ZCTextIndex - prefix wildcards not supported?

Andreas Jung lists at andreas-jung.com
Sat Nov 22 03:07:01 EST 2003



--On Freitag, 21. November 2003 21:58 Uhr +0100 Dieter Maurer 
<dieter at handshake.de> wrote:

> 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.

Truncation can be achived very easily by performing a range search
on BTrees....very evil but it works!.

-aj´





More information about the Zope mailing list