Merge commit '36c0545b9986917276999d399b01ac2ff0850099' into develop

This commit is contained in:
brianjlowe 2013-11-07 12:28:14 -05:00
commit 66dba4ef27

View file

@ -281,11 +281,24 @@ public class IndexBuilder extends VitroBackgroundThread {
//keep uris unique by using a HashSet
Collection<String> urisToUpdate = new HashSet<String>();
for( Statement stmt : getAndClearChangedStmts() ){
for( StatementToURIsToUpdate stu : stmtToURIsToIndexFunctions ){
urisToUpdate.addAll( stu.findAdditionalURIsToIndex(stmt) );
}
}
Statement[] changedStatements = getAndClearChangedStmts();
int howManyChanges = changedStatements.length;
if (howManyChanges > 100) {
log.info("Finding URIs that are affected by " + howManyChanges
+ " changed statements.");
}
for (int i = 0; i < howManyChanges; i++) {
Statement stmt = changedStatements[i];
for (StatementToURIsToUpdate stu : stmtToURIsToIndexFunctions) {
urisToUpdate.addAll(stu.findAdditionalURIsToIndex(stmt));
}
if ((i > 0) && (i % 1000 == 0)) {
log.info("Processed " + i + " changed statements; found "
+ urisToUpdate.size() + " affected URIs.");
}
}
//inform StatementToURIsToUpdate that they are done
for( StatementToURIsToUpdate stu : stmtToURIsToIndexFunctions ) {