MERGEING r5396 from nihvivo-rel-1.1-maint BY HAND . Fixing code to build search index at ontology update NIHVIVO-900
This commit is contained in:
parent
e95fd811f0
commit
23007ba45e
1 changed files with 4 additions and 2 deletions
|
@ -136,9 +136,11 @@ public class LuceneSetup implements javax.servlet.ServletContextListener {
|
||||||
(Boolean)sce.getServletContext().getAttribute(INDEX_REBUILD_REQUESTED_AT_STARTUP) ){
|
(Boolean)sce.getServletContext().getAttribute(INDEX_REBUILD_REQUESTED_AT_STARTUP) ){
|
||||||
builder.doIndexRebuild();
|
builder.doIndexRebuild();
|
||||||
log.info("Rebuild of search index required before startup.");
|
log.info("Rebuild of search index required before startup.");
|
||||||
|
int n = 0;
|
||||||
while( builder.isIndexing() ){
|
while( builder.isIndexing() ){
|
||||||
Thread.currentThread().sleep(200);
|
Thread.currentThread().sleep(500);
|
||||||
log.info("Still rebulding search index");
|
if( n % 20 == 0 ) //output message every 10 sec.
|
||||||
|
log.info("Still rebulding search index");
|
||||||
}
|
}
|
||||||
log.info("Search index rebuild completed.");
|
log.info("Search index rebuild completed.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue