[Zope3-dev] catalog 'all documents' abstraction

Martijn Faassen faassen at infrae.com
Tue Aug 30 12:07:30 EDT 2005


Hi there,

Now that there's a plain catalog and an extent catalog, and while I was 
implementing a 'not' operator for a query language, I ran into some 
missing abstraction that would be convienient; a way to get all the 
object ids that are indexed, preferably in the form of a IFBTree so I 
can do fast intersections and the like (which are needed for "not", 
which is an intersection of all object ids with those object ids I don't 
want).

Right now this information is not really available in a standard or a 
very efficient manner. For the normal catalog you can ask the IIntId 
utility for all int ids, which is reasonable and should be fairly 
efficient, though it'd be nice to have something come out in IFBTree 
form (or perhaps the intid's IOBTree can be intersected with an IFBTree 
directly? that'd be nice..). I also think however that it's the wrong 
place the ask for this information, as this doesn't work with the 
extentcatalog.

The catalog itself seems like the wrong place to ask as well however, as 
things would get hairy in the case of a query over multiple catalogs -- 
which catalog would be asked for all ids that are indexed?

Hm, perhaps this isn't ideal either, as this would get hairy in case of 
a query that spans multiple catalogs -- which catalog will be asked in 
that case for a list of all documents?

(note that 'not equals' on a FieldIndex can be implemented more 
efficiently as in this case the index itself can be used as the list of 
'all documents')

Does anybody have ideas on what the best way to go here would be?

Regards,

Martijn


More information about the Zope3-dev mailing list