public class DirectSolrConnection extends Object
Constructor and Description |
---|
DirectSolrConnection()
Deprecated.
|
DirectSolrConnection(SolrCore c)
Initialize using an explicit SolrCore
|
DirectSolrConnection(String instanceDir,
String dataDir,
String loggingPath)
This constructor is designed to make it easy for JNI embedded applications
to setup the entire solr environment with a simple interface.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Use this method to close the underlying SolrCore.
|
String |
request(SolrRequestHandler handler,
SolrParams params,
String body) |
String |
request(String pathAndParams,
String body)
For example:
String json = solr.request( "/select?
|
@Deprecated public DirectSolrConnection()
DirectSolrConnection(SolrCore)
public DirectSolrConnection(SolrCore c)
public DirectSolrConnection(String instanceDir, String dataDir, String loggingPath)
instanceDir:
The solr instance directory. If null, it will check the standard
places first (JNDI,properties,"solr" directory)
dataDir:
where the index is stored.
loggingPath:
Path to a java.util.logging.config.file. If the path represents
an absolute path or is relative to the CWD, it will use that. Next it will try a path
relative to the instanceDir. If none of these files exist, it will error.public String request(String pathAndParams, String body) throws Exception
Exception
public String request(SolrRequestHandler handler, SolrParams params, String body) throws Exception
Exception
public void close()