I see the jira issue is still open, so hopefully this is relevant for 
someone.

I had a similar issue now with oai-pmh -c import in a Dspace 5 instance.

To locate which item was the culprit I received good help from this old 
nabble thread on dspace oai -c error 
<http://dspace.2283337.n4.nabble.com/problems-with-OAI-td4671531.html>, but 
our discovery index did not return any matches of items without handles, 
and the sql query returned > 1000 items. The oai-pmh clean index ran after 
changing the item without a DOI to private to change discoverable to false. 
This would make the item no longer harvestable through OAI. 

SELECT item_id FROM item WHERE (in_archive=TRUE OR withdrawn=TRUE) AND 
discoverable=TRUE AND
NOT EXISTS
  (SELECT resource_id FROM handle WHERE handle.resource_id =
item.item_id);


In case someone has a similar error when reindexing, and needs to locate the 
item to fix the index.

I also noted that since the sql query used by the (oai) clean index 
<https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-oai/src/main/java/org/dspace/xoai/app/XOAI.java#L188>
 doesn't sort by date,
running:

dspace oai import -c # Failed after 12200 items
dspace oai import # Ran succesfully for 2000 items, probably because the error 
item was older than the newest existing post in the index


This left us with an OAI index missing around 3000 items.

I don't know if this has been fixed in later dspaces, but I notice the code 
has been refactored.

Best regards,
Øyvind

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/822f92f9-20e9-4b5b-8a70-7eee86056ed6%40googlegroups.com.

Reply via email to