/** * If the handle for the "dso" already exists in the index, and the "dso" * has a lastModified timestamp that is newer than the document in the index * then it is updated, otherwise a new document is added. * * @param context Users Context * @param dso DSpace Object (Item, Collection or Community * @throws SQLException if error */ @Override public void indexContent(Context context, DSpaceObject dso) throws SQLException { indexContent(context, dso, false); }
/** * If the handle for the "dso" already exists in the index, and the "dso" * has a lastModified timestamp that is newer than the document in the index * then it is updated, otherwise a new document is added. * * @param context Users Context * @param dso DSpace Object (Item, Collection or Community * @throws SQLException * @throws IOException */ public void indexContent(Context context, DSpaceObject dso) throws SQLException { indexContent(context, dso, false); }
@Override public void indexContent(Context context, DSpaceObject dso, boolean force, boolean commit) throws SearchServiceException, SQLException { indexContent(context, dso, force); if (commit) { commit(); } }
/** * reIndexContent removes something from the index, then re-indexes it * * @param context context object * @param dso object to re-index */ @Override public void reIndexContent(Context context, DSpaceObject dso) throws SQLException, IOException { try { indexContent(context, dso); } catch (Exception exception) { log.error(exception.getMessage(), exception); emailException(exception); } }
/** * reIndexContent removes something from the index, then re-indexes it * * @param context context object * @param dso object to re-index */ public void reIndexContent(Context context, DSpaceObject dso) throws SQLException, IOException { try { indexContent(context, dso); } catch (Exception exception) { log.error(exception.getMessage(), exception); emailException(exception); } }
for (items = itemService.findAllUnfiltered(context); items.hasNext(); ) { Item item = items.next(); indexContent(context, item, force); indexContent(context, collection, force); indexContent(context, community, force);
for (items = Item.findAll(context); items.hasNext();) { Item item = items.next(); indexContent(context, item, force); item.decache(); indexContent(context, collection, force); context.removeCached(collection, collection.getID()); indexContent(context, community, force); context.removeCached(community, community.getID());