Merge commit '36c0545b9986917276999d399b01ac2ff0850099' into develop
This commit is contained in:
commit
66dba4ef27
1 changed files with 18 additions and 5 deletions
|
@ -281,10 +281,23 @@ public class IndexBuilder extends VitroBackgroundThread {
|
||||||
|
|
||||||
//keep uris unique by using a HashSet
|
//keep uris unique by using a HashSet
|
||||||
Collection<String> urisToUpdate = new HashSet<String>();
|
Collection<String> urisToUpdate = new HashSet<String>();
|
||||||
for( Statement stmt : getAndClearChangedStmts() ){
|
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) {
|
for (StatementToURIsToUpdate stu : stmtToURIsToIndexFunctions) {
|
||||||
urisToUpdate.addAll(stu.findAdditionalURIsToIndex(stmt));
|
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
|
//inform StatementToURIsToUpdate that they are done
|
||||||
|
|
Loading…
Add table
Reference in a new issue