[Zope] Searching a FieldIndex for prefix or OR
Dieter Maurer
dieter@handshake.de
Tue, 3 Apr 2001 21:23:28 +0200 (CEST)
Randall F. Kern writes:
> Is it possible to search a catalog on a field index for either a given
> prefix, or any of a list of values?
"Prefix" means your fields contain strings...
You could try to emulate such searches through range searches.
In usual cases (not all, I agree), PREFIX(x) == p
is similar to "p <= x <= (p + chr(255)*n)"
with "n" sufficiently large (usually "1" will be enough).
A search against a list of values is supported directly.
See the catalog section of
URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
Dieter