mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
Ensure that the item is in the archive and eligible for indexing before adding it to Lucene
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2197 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -243,18 +243,23 @@ public class DSIndexer
|
|||||||
switch (dso.getType())
|
switch (dso.getType())
|
||||||
{
|
{
|
||||||
case Constants.ITEM :
|
case Constants.ITEM :
|
||||||
if(requiresIndexing(handle, ((Item)dso).getLastModified()) || force)
|
Item item = (Item)dso;
|
||||||
|
if (item.isArchived() && !item.isWithdrawn())
|
||||||
{
|
{
|
||||||
Document doc = buildDocument(context, (Item) dso);
|
if(requiresIndexing(handle, ((Item)dso).getLastModified()) || force)
|
||||||
|
{
|
||||||
/* open inside stale block, after building doc
|
Document doc = buildDocument(context, (Item) dso);
|
||||||
* to limit the total time spent in a lock.
|
|
||||||
*/
|
/* open inside stale block, after building doc
|
||||||
writer = openIndex(context, false);
|
* to limit the total time spent in a lock.
|
||||||
writer.updateDocument(t, doc);
|
*/
|
||||||
|
writer = openIndex(context, false);
|
||||||
log.info("Wrote Item: " + handle + " to Index");
|
writer.updateDocument(t, doc);
|
||||||
|
|
||||||
|
log.info("Wrote Item: " + handle + " to Index");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Constants.COLLECTION :
|
case Constants.COLLECTION :
|
||||||
|
Reference in New Issue
Block a user