Standardized portal_catalog index for all UID back-references

Sean Upton <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CANjV-2MjJHTsj0vCmWX1jk62BGxy8OePAkbhyPZv99_sNLrR6Q@mail.gmail.com>
Folks,

We have the ability to index UID of items in portal_catalog.  This is
all well and good, but what index should ideally be used (or a new one
created) for tracking back-references?

Use-cases:

(1) Add-on developer wants standard way to have some kind of
referential integrity -- that is, do not delete item X if item Y
refers to it using a uuid-based reference.

...But every add-on, if they do index back-references is likely doing
so in a custom index, named specific to the problem domain of that
add-on.  This might increase proliferation of specific indexes, when a
generic, single, standardized one is appropriate.

(2) Add-on developer wants to have a portlet or view that shows what
other objects reference this object.  For example, I have an "In Use
By" object action tab with a view that lists items that "use" the
context, and that action only shows up when the item context is
actually in use.  But again, I am using an application-specific index
to implement a solution to this general problem.

(3) In a view, add-on developer wants to list some subset of
back-references, filtering on catalog brains retrieved for each
source.  Each subset need not have its own index, as filtering a
broader query of references is almost always reasonably performing.

Is this as simple as using a custom indexer adapter for
getRawRelatedItems, or is the creation of a broader-purpose keyword
index called for here?   It is possible to have a standardized index
for which add-on developers are encouraged to create indexer adapters
for?

If there is a case for a new keyword index: what should it be named?
If there is cause, I want to PLIP something for Plone 5.  If not, I'm
open to suggestions.

Sean

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.