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: 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?