[Zope] Searching across multiple indexes

Dieter Maurer dieter at handshake.de
Tue Oct 28 15:42:24 EST 2003


Paul Smith wrote at 2003-10-28 13:44 +0000:
 > ...
 > I have a catalog which contains two indexed: description_idx; notes_idx
 > 
 > Both indexes can be searched in isolation; the lexicon shows content, and 
 > so there appears to be nothing wrong with the indexes.
 > 
 > The following code works OK (ie it returns objects as I would expect), 
 > doing an 'and' search of the two indexes - with the search term appearing 
 > in both indexes:
 > 
 > <tal:block tal:define="term request/form/search_term;
 >                      results  python: 
 > here.Catalog({'description_idx':term,'notes_idx':term});">
 > 
 > 
 > However, if I change this code to read:
 > 
 > results  python: here.Catalog({'description_idx':term},{'notes_idx':term});
 > 
 > which I have read should produce an 'or' search,

Mark the source of this reading as untrustworthy.

The "Catalog" does not support to combine subqueries against different
indexes by "or".


There is an extension by Casey Duncan (something like "CatalogQuery")
that provides this feature. Have a look at it...

-- 
Dieter



More information about the Zope mailing list