Comment 2 for bug 1639044

Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1639044] Explore path-index like queries

We will need the ability to the following. For an object at:

/communities/some-community/folders/folderA/folder22/folderB

…to get folder listings for folderB, folder 22, and folderA. With filtered query support.

We can do this in another way, simply by adding a column “parent”.

We don’t necessarily need to do queries for folderA and get everything in folder22 and folderB, if that’s what you mean. But we do need to know everything in some-community.

—Paul

> On Nov 4, 2016, at 4:35 PM, Jim Fulton <email address hidden> 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?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1639044
>
> Title:
> Explore path-index like queries
>
> Status in KARL4:
> New
>
> Bug description:
> We currently hard-code "community" as a column in our (hacked)
> pgtextindex. However, we are also going to need to query folder/files
> in a subfolder. Our current plan was to add another column called
> "parent" and use it for that case.
>
> We could consider solving both with the Zope concept of path index. Do
> a little research on that. Perhaps it can be encoded directly as an
> array of docids.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl4/+bug/1639044/+subscriptions