|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.servlet.DirectSolrConnection
public class DirectSolrConnection
DirectSolrConnection provides an interface to solr that is similar to the the HTTP interface, but does not require an HTTP connection. This class is designed to be as simple as possible and alow for more flexibility in how you interface to solr.
Constructor Summary | |
---|---|
DirectSolrConnection()
Initialize using the static singleton SolrCore.getSolrCore(). |
|
DirectSolrConnection(SolrCore c)
Initialize using an explicit SolrCore |
|
DirectSolrConnection(java.lang.String instanceDir,
java.lang.String dataDir,
java.lang.String loggingPath)
This constructor is designed to make it easy for JNI embedded applications to setup the entire solr environment with a simple interface. |
Method Summary | |
---|---|
java.lang.String |
request(java.lang.String pathAndParams,
java.lang.String body)
For example: String json = solr.request( "/select?qt=dismax&wt=json&q=...", null ); String xml = solr.request( "/update", "<add> |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectSolrConnection()
public DirectSolrConnection(SolrCore c)
public DirectSolrConnection(java.lang.String instanceDir, java.lang.String dataDir, java.lang.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.
Method Detail |
---|
public java.lang.String request(java.lang.String pathAndParams, java.lang.String body) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |