Explore path-index like queries
Bug #1639044 reported by
Paul Everitt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL4 |
Won't Fix
|
Medium
|
Jim Fulton |
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.
Changed in karl4: | |
milestone: | 025 → 026 |
Changed in karl4: | |
milestone: | 026 → 027 |
To post a comment you must log in.
I had to refresh my memory of what path indexes did. So I looked at:
https:/ /docs.zope. org/zope2/ zope2book/ SearchingZCatal og.html# path-index- record- attributes
And then at:
https:/ /github. com/zopefoundat ion/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?