AdvancedQuery is a ZopeProduct for flexible queries against ZCatalog? or CatalogTool?.
Queries can be arbitrarily combined with "and", "or" and "not". All index types are almost fully supported (exception: relevance sorting of TextIndexes?).
AdvancedQuery supports efficient incremental (lazy) multi-level sorting via
FieldIndexes?. This means, you can sort via e.g.
"sort_on=((Date,desc), portal_type, id)". For large
result sets, sorting is performed incrementally,
only as far as you access the result. This can drastically speed up
sorting time.
AdvancedQuery is especially efficient for ManagableIndex's.
http://www.dieter.handshake.de/pyprojects/zope#AdvancedQuery