Class BaseSolrResource

  • Direct Known Subclasses:
    RestManager.ManagedEndpoint

    public abstract class BaseSolrResource
    extends Object
    Base class for delegating REST-oriented requests to ManagedResources. ManagedResources are heavy-weight and should not be created for every request, so this class serves as a gateway between a REST call and the resource.
    • Constructor Detail

      • BaseSolrResource

        protected BaseSolrResource()
    • Method Detail

      • getSolrCore

        public SolrCore getSolrCore()
      • getContentType

        public String getContentType()
      • getUpdateTimeoutSecs

        protected int getUpdateTimeoutSecs()
      • doInit

        public void doInit​(SolrQueryRequest solrRequest,
                           SolrQueryResponse solrResponse)
        Pulls the SolrQueryRequest constructed in SolrDispatchFilter from the SolrRequestInfo thread local, then gets the SolrCore and IndexSchema and sets up the response. writer.
      • handlePostExecution

        protected void handlePostExecution​(org.slf4j.Logger log)
        Deal with an exception on the SolrResponse, fill in response header info, and log the accumulated messages on the SolrResponse.
      • addDeprecatedWarning

        protected void addDeprecatedWarning()
      • handleException

        protected void handleException​(org.slf4j.Logger log)
        If there is an exception on the SolrResponse:
        • error info is added to the SolrResponse;
        • the response status code is set to the error code from the exception; and
        • the exception message is added to the list of things to be logged.