use of org.alfresco.solr.SolrInformationServer in project SearchServices by Alfresco.
the class Solr4QueryParser method getContentStore.
/**
* Extracts the contentStore from SolrQueryRequest.
* @param req
* @return
*/
private SolrContentStore getContentStore(SolrQueryRequest req) {
if (req.getSearcher() != null) {
CoreContainer coreContainer = req.getSearcher().getCore().getCoreContainer();
AlfrescoCoreAdminHandler coreAdminHandler = (AlfrescoCoreAdminHandler) coreContainer.getMultiCoreHandler();
SolrInformationServer srv = (SolrInformationServer) coreAdminHandler.getInformationServers().get(req.getSearcher().getCore().getName());
return srv.getSolrContentStore();
}
return null;
}
Aggregations