Re: [Zope-dev] PathIndex doesn't index last part of path
If you call getObject, that actually does traversal anyway. Right, in that situation it would be pointless... You rock, Casey, thanks. I was thinking more about adding: def getMetadataFromPath(self, path): get metadata for an object using its path rid = self._catalog.uids[path] return self._catalog.getMetadataForRID(rid) def getIndexFromPath(self, path): get index for an object using its path rid = self._catalog.uids[path] return self._catalog.getIndexDataForRID(rid) Since this uses the same terminology and returns the same data as getIndexDataForRID and getMetadataDataForRID. Is there any reason why I couldn't checked these in? -- Andy McKay Agmweb Consulting http://www.agmweb.ca ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PathIndex doesn't index last part of path
Your code looks fine, I think it meshes better with the underlying catalog code too. I don't have a problem with this getting checked in, just make sure you update IZCatalog.py, help/Catalog.py and add unit tests (that pass ;^). -Casey - Original Message - From: Andy McKay [EMAIL PROTECTED] To: Casey Duncan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 2:54 AM Subject: Re: [Zope-dev] PathIndex doesn't index last part of path If you call getObject, that actually does traversal anyway. Right, in that situation it would be pointless... You rock, Casey, thanks. I was thinking more about adding: def getMetadataFromPath(self, path): get metadata for an object using its path rid = self._catalog.uids[path] return self._catalog.getMetadataForRID(rid) def getIndexFromPath(self, path): get index for an object using its path rid = self._catalog.uids[path] return self._catalog.getIndexDataForRID(rid) Since this uses the same terminology and returns the same data as getIndexDataForRID and getMetadataDataForRID. Is there any reason why I couldn't checked these in? -- Andy McKay Agmweb Consulting http://www.agmweb.ca ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PathIndex doesn't index last part of path
Woohoo my first check in ;) -- Andy McKay Agmweb Consulting http://www.agmweb.ca - Original Message - From: Casey Duncan [EMAIL PROTECTED] To: Andy McKay [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, August 17, 2002 12:14 PM Subject: Re: [Zope-dev] PathIndex doesn't index last part of path Your code looks fine, I think it meshes better with the underlying catalog code too. I don't have a problem with this getting checked in, just make sure you update IZCatalog.py, help/Catalog.py and add unit tests (that pass ;^). -Casey - Original Message - From: Andy McKay [EMAIL PROTECTED] To: Casey Duncan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 2:54 AM Subject: Re: [Zope-dev] PathIndex doesn't index last part of path If you call getObject, that actually does traversal anyway. Right, in that situation it would be pointless... You rock, Casey, thanks. I was thinking more about adding: def getMetadataFromPath(self, path): get metadata for an object using its path rid = self._catalog.uids[path] return self._catalog.getMetadataForRID(rid) def getIndexFromPath(self, path): get index for an object using its path rid = self._catalog.uids[path] return self._catalog.getIndexDataForRID(rid) Since this uses the same terminology and returns the same data as getIndexDataForRID and getMetadataDataForRID. Is there any reason why I couldn't checked these in? -- Andy McKay Agmweb Consulting http://www.agmweb.ca ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PathIndex doesn't index last part of path
Casey Duncan writes: A PathIndex is designed to make it more efficient to aggregate objects at various levels of containment. Their primary use case AFAIK is to allow to to limit queries to particular places within a hierarchy. The idea is to eliminate recursive searching of leaf level folders when you want all objects under a higher level and its child levels. Also, by not indexing the nodes themselves, the index is an order of magnitude smaller and searches are therefore faster and it takes less room and is faster to update. This property need to be well documented. At least, it is not intuitive. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PathIndex doesn't index last part of path
Hi, Sorry, maybe I'm too late ;) but I have a note here. uid in Cataloc can be path but it can be any arbitrary unigue identifier. In system I'm working with it is ID generated in the time of object creation and it persists and it is uid in Catalog. Nothing wrong with the methods themselves but about their name. As far as I understood they are getRecordFromPath, getMetadataFromPath, getIndexFromPath. Generally it will be path a uid of Catalolog, but naming in other cases will be confusing. Maybe it is just a question of documentation? Regards, m. Casey Duncan wrote: Your code looks fine, I think it meshes better with the underlying catalog code too. I don't have a problem with this getting checked in, just make sure you update IZCatalog.py, help/Catalog.py and add unit tests (that pass ;^). -Casey - Original Message - From: Andy McKay [EMAIL PROTECTED] To: Casey Duncan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 2:54 AM Subject: Re: [Zope-dev] PathIndex doesn't index last part of path If you call getObject, that actually does traversal anyway. Right, in that situation it would be pointless... You rock, Casey, thanks. I was thinking more about adding: def getMetadataFromPath(self, path): get metadata for an object using its path rid = self._catalog.uids[path] return self._catalog.getMetadataForRID(rid) def getIndexFromPath(self, path): get index for an object using its path rid = self._catalog.uids[path] return self._catalog.getIndexDataForRID(rid) Since this uses the same terminology and returns the same data as getIndexDataForRID and getMetadataDataForRID. Is there any reason why I couldn't checked these in? -- Andy McKay Agmweb Consulting http://www.agmweb.ca -- Myroslav Opyr zope.net.ua http://zope.net.ua/ ° Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PathIndex doesn't index last part of path
Yes I agree, I think it would be better if the apis were getRecordForUid, getIndexForUid since the uids can be something other than paths.Thanks for the input on that. -Casey - Original Message - From: Myroslav Opyr [EMAIL PROTECTED] To: Casey Duncan [EMAIL PROTECTED] Cc: Andy McKay [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 6:55 PM Subject: Re: [Zope-dev] PathIndex doesn't index last part of path Hi, Sorry, maybe I'm too late ;) but I have a note here. uid in Cataloc can be path but it can be any arbitrary unigue identifier. In system I'm working with it is ID generated in the time of object creation and it persists and it is uid in Catalog. Nothing wrong with the methods themselves but about their name. As far as I understood they are getRecordFromPath, getMetadataFromPath, getIndexFromPath. Generally it will be path a uid of Catalolog, but naming in other cases will be confusing. Maybe it is just a question of documentation? Regards, m. Casey Duncan wrote: Your code looks fine, I think it meshes better with the underlying catalog code too. I don't have a problem with this getting checked in, just make sure you update IZCatalog.py, help/Catalog.py and add unit tests (that pass ;^). -Casey - Original Message - From: Andy McKay [EMAIL PROTECTED] To: Casey Duncan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 2:54 AM Subject: Re: [Zope-dev] PathIndex doesn't index last part of path If you call getObject, that actually does traversal anyway. Right, in that situation it would be pointless... You rock, Casey, thanks. I was thinking more about adding: def getMetadataFromPath(self, path): get metadata for an object using its path rid = self._catalog.uids[path] return self._catalog.getMetadataForRID(rid) def getIndexFromPath(self, path): get index for an object using its path rid = self._catalog.uids[path] return self._catalog.getIndexDataForRID(rid) Since this uses the same terminology and returns the same data as getIndexDataForRID and getMetadataDataForRID. Is there any reason why I couldn't checked these in? -- Andy McKay Agmweb Consulting http://www.agmweb.ca -- Myroslav Opyr zope.net.ua http://zope.net.ua/ ° Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )