Class HttpSolrCall

    • Constructor Detail

      • HttpSolrCall

        public HttpSolrCall​(SolrDispatchFilter solrDispatchFilter,
                            CoreContainer cores,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            boolean retry)
    • Method Detail

      • getPath

        public String getPath()
      • getReq

        public javax.servlet.http.HttpServletRequest getReq()
      • getQueryParams

        public org.apache.solr.common.params.SolrParams getQueryParams()
      • getCollectionsList

        public List<String> getCollectionsList()
        The collection(s) referenced in this request. Populated in init(). Not null.
      • resolveCollectionListOrAlias

        protected List<String> resolveCollectionListOrAlias​(String collectionStr)
        Resolves the parameter as a potential comma delimited list of collections, and resolves aliases too. One level of aliases pointing to another alias is supported. De-duplicates and retains the order. getCollectionsList()
      • extractHandlerFromURLPath

        protected void extractHandlerFromURLPath​(SolrRequestParsers parser)
                                          throws Exception
        Extract handler from the URL path if not set.
        Throws:
        Exception
      • handleAdminOrRemoteRequest

        protected void handleAdminOrRemoteRequest()
                                           throws IOException
        Handle a request whose "type" could not be discerned in advance and may be either "admin" or "remotequery".

        Some implementations (such as V2HttpCall) may find it difficult to differentiate all request types in advance. This method serves as a hook; allowing those implementations to handle these cases gracefully.

        Throws:
        IOException
        See Also:
        V2HttpCall
      • getSpan

        protected io.opentracing.Span getSpan()
        Get the span for this request. Not null.
      • populateTracingSpan

        protected void populateTracingSpan​(io.opentracing.Span span)
      • getCoreOrColName

        protected String getCoreOrColName()
      • shouldAudit

        public boolean shouldAudit()
      • shouldAudit

        public static boolean shouldAudit​(CoreContainer cores)
      • getResponseWriter

        protected QueryResponseWriter getResponseWriter()
        Returns QueryResponseWriter to be used. When CommonParams.WT not specified in the request or specified value doesn't have corresponding QueryResponseWriter then, returns the default query response writer Note: This method must not return null
      • addCollectionParamIfNeeded

        protected void addCollectionParamIfNeeded​(List<String> collections)
        Sets the "collection" parameter on the request to the list of alias-resolved collections for this request. It can be avoided sometimes. Note: HttpShardHandler processes this param.
        See Also:
        getCollectionsList()
      • getCoreByCollection

        protected SolrCore getCoreByCollection​(String collectionName,
                                               boolean isPreferLeader)
      • getRemoteCoreUrl

        protected String getRemoteCoreUrl​(String collectionName,
                                          String origCorename)
                                   throws org.apache.solr.common.SolrException
        Throws:
        org.apache.solr.common.SolrException
      • _getHandler

        protected Object _getHandler()
      • getCommands

        public List<org.apache.solr.common.util.CommandOperation> getCommands​(boolean validateInput)
      • getSpec

        protected org.apache.solr.common.util.ValidatingJsonMap getSpec()
      • getValidators

        protected Map<String,​org.apache.solr.common.util.JsonSchemaValidator> getValidators()