Skip to content

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

@hannosch

Description

@hannosch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions