Class MCRSolrSearchServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.mycore.frontend.servlets.MCRServlet
org.mycore.solr.search.MCRSolrSearchServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class MCRSolrSearchServlet extends MCRServlet
Used to map a formular-post to a solr request.

Parameters

Solr reserved parameters
They will directly forwarded to the server.
Type parameters
They are used to join other documents in the search. They start with "solr.type.".
Sort parameters
They are used to sort the results in the right order. They start with "sort."
Query parameters
They are used to build the query for solr. All parameters which are not reserved, type or sort parameters will be stored here.
Author:
mcrshofm, mcrsherm
See Also:
  • Constructor Details

    • MCRSolrSearchServlet

      public MCRSolrSearchServlet()
  • Method Details

    • buildSelectParameterMap

      protected Map<String,String[]> buildSelectParameterMap(Map<String,String[]> queryParameters, Map<String,String[]> typeParameters, Map<String,String[]> sortParameters, Set<String> phraseQuery) throws jakarta.servlet.ServletException
      Parameters:
      queryParameters - all parameter where getParameterGroup.equals(QueryParameter)
      typeParameters - all parameter where getParameterGroup.equals(TypeParameter)
      Returns:
      a map which can be forwarded to MCRSolrProxyServlet
      Throws:
      jakarta.servlet.ServletException
    • doGetPost

      protected void doGetPost(MCRServletJob job) throws Exception
      Description copied from class: MCRServlet
      This method should be overwritten by other servlets. As a default response we indicate the HTTP 1.1 status code 501 (Not Implemented).
      Overrides:
      doGetPost in class MCRServlet
      Throws:
      Exception
    • init

      public void init() throws jakarta.servlet.ServletException
      Overrides:
      init in class MCRServlet
      Throws:
      jakarta.servlet.ServletException
    • extractParameterList

      protected void extractParameterList(Map<String,String[]> requestParameter, Map<String,String[]> queryParameter, Map<String,String[]> solrParameter, Map<String,String[]> typeParameter, Map<String,String[]> sortParameter)
      Splits the parameters into three groups.
      Parameters:
      requestParameter - the map of parameters to split.
      queryParameter - all querys will be stored here.
      solrParameter - all solr-parameters will be stored here.
      typeParameter - all type-parameters will be stored here.
      sortParameter - all sort-parameters will be stored here.