Class ModifiedHttpSolrClient

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable

    public class ModifiedHttpSolrClient
    extends org.apache.solr.client.solrj.impl.HttpSolrClient
    This class overrides and somewhat changes the behavior of the SolrJ HttpSolrServer class. The point of all this is simply to get the right information to Tika. When SolrJ uses GET or POST but not multipart-post, it does not include multipart headers that Tika uses - specifically, the name of the document and the length of the document. Patches have been submitted to the SOLR ticket queue to address this problem in a method-insensitive way, but so far there has been no sign that the Solr team is interested in committing them.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.solr.client.solrj.impl.HttpSolrClient

        org.apache.solr.client.solrj.impl.HttpSolrClient.Builder, org.apache.solr.client.solrj.impl.HttpSolrClient.HttpUriRequestResponse, org.apache.solr.client.solrj.impl.HttpSolrClient.RemoteExecutionException, org.apache.solr.client.solrj.impl.HttpSolrClient.RemoteSolrException
    • Field Summary

      • Fields inherited from class org.apache.solr.client.solrj.impl.HttpSolrClient

        AGENT, baseUrl, invariantParams, parser, requestWriter
    • Constructor Summary

      Constructors 
      Constructor Description
      ModifiedHttpSolrClient​(java.lang.String baseURL, org.apache.http.client.HttpClient client, org.apache.solr.client.solrj.ResponseParser parser, boolean allowCompression)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.http.client.methods.HttpRequestBase createMethod​(org.apache.solr.client.solrj.SolrRequest request, java.lang.String collection)  
      static java.lang.String toQueryString​(org.apache.solr.common.params.SolrParams params, boolean xml)  
      • Methods inherited from class org.apache.solr.client.solrj.impl.HttpSolrClient

        calculateQueryParams, close, executeMethod, getBaseURL, getHttpClient, getInvariantParams, getParser, getQueryParams, httpUriRequest, httpUriRequest, isUseMultiPartPost, request, request, request, setBaseURL, setConnectionTimeout, setFollowRedirects, setParser, setQueryParams, setRequestWriter, setSoTimeout, setUseMultiPartPost
      • Methods inherited from class org.apache.solr.client.solrj.SolrClient

        add, add, add, add, add, add, add, add, add, add, addBean, addBean, addBean, addBean, addBeans, addBeans, addBeans, addBeans, addBeans, addBeans, commit, commit, commit, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, deleteByQuery, deleteByQuery, getBinder, getById, getById, getById, getById, getById, getById, getById, getById, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModifiedHttpSolrClient

        public ModifiedHttpSolrClient​(java.lang.String baseURL,
                                      org.apache.http.client.HttpClient client,
                                      org.apache.solr.client.solrj.ResponseParser parser,
                                      boolean allowCompression)
    • Method Detail

      • createMethod

        protected org.apache.http.client.methods.HttpRequestBase createMethod​(org.apache.solr.client.solrj.SolrRequest request,
                                                                              java.lang.String collection)
                                                                       throws java.io.IOException,
                                                                              org.apache.solr.client.solrj.SolrServerException
        Overrides:
        createMethod in class org.apache.solr.client.solrj.impl.HttpSolrClient
        Throws:
        java.io.IOException
        org.apache.solr.client.solrj.SolrServerException
      • toQueryString

        public static java.lang.String toQueryString​(org.apache.solr.common.params.SolrParams params,
                                                     boolean xml)