mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #3449 from esaunders/3551_solr_status
Modified Solr status command to not request index info.
This commit is contained in:
commit
8bcdbf74b2
@ -56,6 +56,7 @@ import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.SolrDocumentList;
|
||||
import org.apache.solr.common.SolrException;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.apache.solr.common.params.CoreAdminParams;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.openide.modules.InstalledFileLocator;
|
||||
import org.openide.modules.Places;
|
||||
@ -600,7 +601,7 @@ public class Server {
|
||||
// making a status request here instead of just doing solrServer.ping(), because
|
||||
// that doesn't work when there are no cores
|
||||
//TODO handle timeout in cases when some other type of server on that port
|
||||
CoreAdminRequest.getStatus(null, localSolrServer);
|
||||
connectToSolrServer(localSolrServer);
|
||||
|
||||
logger.log(Level.INFO, "Solr server is running"); //NON-NLS
|
||||
} catch (SolrServerException ex) {
|
||||
@ -1180,7 +1181,11 @@ public class Server {
|
||||
* @throws IOException
|
||||
*/
|
||||
void connectToSolrServer(HttpSolrServer solrServer) throws SolrServerException, IOException {
|
||||
CoreAdminRequest.getStatus(null, solrServer);
|
||||
CoreAdminRequest statusRequest = new CoreAdminRequest();
|
||||
statusRequest.setCoreName( null );
|
||||
statusRequest.setAction( CoreAdminParams.CoreAdminAction.STATUS );
|
||||
statusRequest.setIndexInfoNeeded(false);
|
||||
statusRequest.process(solrServer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user