[Zope3-Users] Looking for "best practice" in content indexing

Lennart Regebro regebro at gmail.com
Tue Oct 3 05:35:57 EDT 2006


On 10/3/06, Thierry Florac <thierry.florac at onf.fr> wrote:
>  - generally speaking, is it better to keep a single "big catalog", or a
> set of many catalogs, each of them indexing a smaller set of classes ? I
> suppose that querying is more simple with a single catalog, but what
> about general performances ??

That completely depends on what you are gonna do.

I would say that you should have one catalog, except for specail
cases, where you index a certain type only to do a certain type of
lookups. (In those cases, you often don't even need a whole catalog,
but a BTree is often enough).

>  - I have to index "main content", but also "reference" classes which
> are used to classify my main content (example : I describe "forests" in
> a first step and afterwards, my main contents can be affected to one or
> more forests). In such a case, I want to make queries concerning forests
> themselves, but also queries about main content concerning forests they
> are attached to (to get, for example, every subject attached to a given
> forest). In this case also, is it better to keep track of the reference
> itself (myContent.forest = myForest) or of an attribute of the reference
> (myContent.forestId = myForest.uniqueId) ??

I'd go with the attribute, although I guess a field index should be
able to index the object directly (haven't tried though).

>  - perhaps a stupid question, but what's the best method to get the
> equivalent of Zope2's "meta_type" indexing, to only get instances of a
> given class, when queried indexes are applied to several classes
> (example : I use adapters to handle workflow publication on a wide set
> of classes, and I want to retrieve contents of a given class in a given
> workflow step) ??

Hmm. What a good question. :)

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope3-users mailing list