Comment 1 for bug 1639044

Revision history for this message
Jim Fulton (jim-zope) wrote :

I had to refresh my memory of what path indexes did. So I looked at:

https://docs.zope.org/zope2/zope2book/SearchingZCatalog.html#path-index-record-attributes

And then at:

https://github.com/zopefoundation/Products.ZCatalog/tree/master/src/Products/PluginIndexes/PathIndex

/me mops up brain matter

Wow, this isn't what I thought I'd remembered.

Do, implementing a path index that supports just searching with level = 0 is pretty simple and fast. Just store and btree-index the document paths with trailing delimiters. (eg '/foo/bar/') and do prefix searches:

  path like '/foo/bar/%'

Is this sufficient? Or do you want support for level != 0?