[Zope] ZCatalog, FieldIndexes and TextIndexes

Kevin Dangoor kid@kendermedia.com
Wed, 6 Oct 1999 17:26:46 -0400


-----Original Message-----
From: marian.mcnatt@smawins.com <marian.mcnatt@smawins.com>
To: zope@zope.org <zope@zope.org>
Date: Wednesday, October 06, 1999 4:49 PM
Subject: [Zope] ZCatalog, FieldIndexes and TextIndexes


>Can someone give me a good explanation of the difference between a
>FieldIndex and a TextIndex?

A "FieldIndex" looks at the entire property value as a single value. A
"TextIndex" breaks the property up into words.

For example, if you have a FieldIndex for "category", and you search for
"Green", you will only find the items with the category "Green" (but not
"Green Shirts" or "Green Eggs"). If this was a TextIndex, searching for
Green would match all three of those.

So, you use FieldIndexes for distinct values that you will be looking for
(category, last name, zip code, etc.). Use TextIndexes for things like
titles, or content that you want to be full text searchable.

>Also...
>I have created a ZCatalog for a search on my web site.  Currently, the
>users can search on Title, Keyword, or Summary, but they have to choose
>which one they want to search on.  I want the search to have one entry
>box that will search all three different fields.  I'm sure there's a
>good way to do this, as I see it on the zope.org site, but I can't
>figure out how they did it.  Any ideas/help would be appreciated.

I'd love to know the answer to this one myself.

Kevin