I’m developing on localhost, using Drupal 7 with the Search API with Solr module. After performing a restore from backup, I needed to reimport several items from a feed. I set up my feed importers, using the Node ID as the unique target. However, after conducting the import, it always returns failure. The error report is a long list of:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '62911-1' for key 'PRIMARY'

(The Duplicate entry number is different for each line.)

There are no nodes or actual content on the site, which leads me to believe that it is something in the database. Could be wrong, though.

I have done the following things to try and rectify this problem, with no luck:

  • Changed “Do not replace existing nodes” to “Update existing nodes” in the Node Processor settings.
  • Changed “Update existing nodes” to “Replace existing nodes” in the Node Processor settings.
  • One search made me realize that my Solr server wasn’t automatically starting, so I did that and then ran the import; no luck.
  • Rebuilt user node access permissions.
  • Installed “Delete All” module and deleted all content, resetting the node id counter from 1.
  • Cleared the Solr index from within Drupal.
  • Deleted all items from within the Solr core itself (although the Index status page at
    admin/config/search/search_api/index/default_node_index still has “172/60857 indexed” under the status bar. This was the only partial success, as it managed to import 172 items, but the rest still received the error.)

Not sure where the problem is. I suppose I could just try and use GUID as the unique target, but I don’t know if that will work. (I’d also like to keep using the Node ID if possible.) I could also try to completely remove the Solr module from Drupal 7 and trying again, which I think will be my next step. However, I am really looking for any thoughts on this. Have any of you encountered this problem before? What have you done to fix this?

1 Answer 1


It turned out it was the Solr module itself. I'm not sure why it wasn't clearly it's index completely, but after disabling and actually removing the module, then reimporting, everything worked.

So if you're having this kind of trouble importing content, and you have the Search API Solr module active, first disable and then remove it so that you have a clean slate on that end. Then you can reimport the content, then later re-add the Solr module and reindex your content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.