Class DirectSolrConnection

java.lang.Object
org.apache.solr.servlet.DirectSolrConnection

@Deprecated public class DirectSolrConnection extends Object
Deprecated.
DirectSolrConnection provides an interface to Solr that is similar to the HTTP interface, but does not require an HTTP connection.

This class is designed to be as simple as possible and allow for more flexibility in how you interface to Solr.

Since:
solr 1.2
  • Field Details

  • Constructor Details

    • DirectSolrConnection

      public DirectSolrConnection(SolrCore c)
      Deprecated.
      Initialize using an explicit SolrCore
  • Method Details

    • request

      public String request(String pathAndParams, String body) throws Exception
      Deprecated.
      For example:

      String json = solr.request( "/select?qt=dismax&wt=json&q=...", null ); String xml = solr.request( "/select?qt=dismax&wt=xml&q=...", null ); String xml = solr.request( "/update", "<add><doc><field ..." );

      Throws:
      Exception
    • request

      public String request(String path, org.apache.solr.common.params.SolrParams params, String body) throws Exception
      Deprecated.
      Throws:
      Exception
    • request

      public String request(SolrRequestHandler handler, org.apache.solr.common.params.SolrParams params, String body) throws Exception
      Deprecated.
      Throws:
      Exception
    • close

      public void close()
      Deprecated.
      Use this method to close the underlying SolrCore.
      Since:
      solr 1.3