[Zope] Searching a FieldIndex for prefix or OR

Randall F. Kern randy@spoke.net
Mon, 2 Apr 2001 20:46:58 -0700


Sure, I'd love a place to start.

-Randy

> -----Original Message-----
> From: Chris McDonough [mailto:chrism@digicool.com]
> Sent: Monday, April 02, 2001 8:51 PM
> To: Randall F. Kern
> Cc: zope@zope.org
> Subject: Re: [Zope] Searching a FieldIndex for prefix or OR
>=20
>=20
> "Randall F. Kern" wrote:
> >=20
> > Is it possible to search a catalog on a field index for=20
> either a given
> > prefix, or any of a list of values?
> >=20
> > Maybe I'm going about this wrong; I want to add the ability=20
> to only show
> > objects found below a specific place on my site, and to do that I
> > created a field index on the path to each object.  Then at=20
> query time I
> > would like to search for /foo/bar/*, or failing that create=20
> a list of
> > all paths below /foo/bar and create an OR query.
> >=20
> > The solution I'm using now is to post-process the search=20
> results, but
> > that seems lame :)
>=20
> Yes, it is lame.  And no, it's not possible with a FieldIndex.  ;-)
>=20
> There's a proposal floating around verbally at DC to create a
> "PathIndex" that has this behavior.  I think Tres actually=20
> sent me some
> code for it at some point.  You want that I should look it up and send
> it to you?
>=20
> - C
>=20