/** * 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); } }
/** * unIndex removes an Item, Collection, or Community only works if the * DSpaceObject has a handle (uses the handle for its unique ID) * * @param context * @param dso DSpace Object, can be Community, Item, or Collection * @throws SQLException * @throws IOException */ public void unIndexContent(Context context, DSpaceObject dso) throws SQLException, IOException { try { unIndexContent(context, dso.getHandle()); } catch (Exception exception) { log.error(exception.getMessage(), exception); emailException(exception); } }
/** * unIndex removes an Item, Collection, or Community * * @param context The relevant DSpace Context. * @param dso DSpace Object, can be Community, Item, or Collection * @param commit if <code>true</code> force an immediate commit on SOLR * @throws SQLException if database error * @throws IOException if IO error */ @Override public void unIndexContent(Context context, DSpaceObject dso, boolean commit) throws SQLException, IOException { try { if (dso == null) { return; } String uniqueID = dso.getType() + "-" + dso.getID(); getSolr().deleteById(uniqueID); if (commit) { getSolr().commit(); } } catch (Exception exception) { log.error(exception.getMessage(), exception); emailException(exception); } }