Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unindexing not working if unique-key is provided through an indexer #2

Open
hannosch opened this issue Jun 4, 2011 · 2 comments
Open

Comments

@hannosch
Copy link

hannosch commented Jun 4, 2011

This was reported by Maurizio Delmonte on July 29, 2009 in the old issue tracker at plone.org:

Using Dexterity and collective.solr, i was able to use the suggested UID unique-key providing the following indexer:

from five import grok
from zope.component import queryUtility
from plone.indexer import indexer

@indexer(ICv)
def UID(obj):
  intid=queryUtility(IIntIds, None)
  if intid:
    return intid.queryId(obj)

grok.global_adapter(UID, name="UID")

That is needed because dexterity 1.0a1 is not providing a UID attribute on its content types.

But, in this way, when the SolrIndexProcessor unindex method is called, it can't find the necessary unique-key value.
Steps to reproduce:

  • create a dexterity content type
  • provide the UID indexer
  • try to cut&paste an object
@hannosch
Copy link
Author

hannosch commented Jun 4, 2011

With Plone 4.1 including plone.uuid it might be a good idea to require that and always use UID / IUUD(obj) as the unique key instead of making it configurable. That would also solve the Dexterity issue.

@witsch
Copy link
Member

witsch commented Jun 9, 2011

sounds like a good plan for 2.0 and up. and as for 1.x we can probably ignore the issue altogether...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants