[Zope] Re: Advanced search in ZCatalog PartII
michael Kobald
micha@kobald.de
Tue, 14 Nov 2000 20:24:10 +0100
Hi,
First Part: Create Index
First, create the index "name of mymethod" in the Catalog.
ZCatalog can only index objects he knows of !
eg. use "find item to ZCatalog" tab, use the index method or use
CatalogAware as base Class for ZClass.
Additionally you have to reindex your object if its content changes (via
DTML-Call....reindex.)
What does the ZCatalog for you ?
He takes your object, applies all the indexes that are possible, and reads
his data. (so we´re back,
you have to return something from your method).
This data is store in the Catalog itself, and not in the object.
Second Part: OR Query:
mmmh, did i get you right ?
I Think it´s this way:
1. Case: looking for a or b or c -> type 'a b c' as query string
2. Case: looking for a and b and c -> type 'a AND b AND c' as query string
3. Case: looking for a and b or c -> type 'a AND b OR c' as query string
4. Case: looking for 'a b c' -> type '"a b c"' as query string
OR
Did you mean somthing like this ?
return self.Catalog(
{'meta_type' :
['pressemitteilung','volltext','kommentar','kurztext'],
'rubrik_id' : self.id,
'review' : 0
}
)
Regards
Michael Kobald