NIHVIVO-2662 changes for not connecting to solr during startup.
This commit is contained in:
parent
f9f3966abe
commit
816ac0d466
1 changed files with 4 additions and 4 deletions
|
@ -90,10 +90,10 @@ public class SolrSetup implements javax.servlet.ServletContextListener{
|
||||||
|
|
||||||
/* setup solr indexer */
|
/* setup solr indexer */
|
||||||
SolrIndexer solrIndexer = new SolrIndexer(server, indToSolrDoc);
|
SolrIndexer solrIndexer = new SolrIndexer(server, indToSolrDoc);
|
||||||
if( solrIndexer.isIndexEmpty() ){
|
/* if( solrIndexer.isIndexEmpty() ){
|
||||||
log.info("solr index is empty, requesting rebuild");
|
log.info("solr index is empty, requesting rebuild");
|
||||||
sce.getServletContext().setAttribute(IndexConstants.INDEX_REBUILD_REQUESTED_AT_STARTUP, Boolean.TRUE);
|
sce.getServletContext().setAttribute(IndexConstants.INDEX_REBUILD_REQUESTED_AT_STARTUP, Boolean.TRUE);
|
||||||
}
|
} */
|
||||||
|
|
||||||
// This is where the builder gets the list of places to try to
|
// This is where the builder gets the list of places to try to
|
||||||
// get objects to index. It is filtered so that non-public text
|
// get objects to index. It is filtered so that non-public text
|
||||||
|
@ -111,7 +111,7 @@ public class SolrSetup implements javax.servlet.ServletContextListener{
|
||||||
SearchReindexingListener srl = new SearchReindexingListener(builder);
|
SearchReindexingListener srl = new SearchReindexingListener(builder);
|
||||||
ModelContext.registerListenerForChanges(ctx, srl);
|
ModelContext.registerListenerForChanges(ctx, srl);
|
||||||
|
|
||||||
if( sce.getServletContext().getAttribute(IndexConstants.INDEX_REBUILD_REQUESTED_AT_STARTUP) instanceof Boolean &&
|
/* if( sce.getServletContext().getAttribute(IndexConstants.INDEX_REBUILD_REQUESTED_AT_STARTUP) instanceof Boolean &&
|
||||||
(Boolean)sce.getServletContext().getAttribute(IndexConstants.INDEX_REBUILD_REQUESTED_AT_STARTUP) ){
|
(Boolean)sce.getServletContext().getAttribute(IndexConstants.INDEX_REBUILD_REQUESTED_AT_STARTUP) ){
|
||||||
log.info("Rebuild of solr index required before startup.");
|
log.info("Rebuild of solr index required before startup.");
|
||||||
builder.doIndexRebuild();
|
builder.doIndexRebuild();
|
||||||
|
@ -122,7 +122,7 @@ public class SolrSetup implements javax.servlet.ServletContextListener{
|
||||||
log.info("Still rebuilding solr index");
|
log.info("Still rebuilding solr index");
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
log.info("Setup of Solr index completed.");
|
log.info("Setup of Solr index completed.");
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue