Package org.mycore.restapi.v1
Class MCRRestAPISearch
java.lang.Object
org.mycore.restapi.v1.MCRRestAPISearch
Rest API methods that cover SOLR searches.
- Version:
- $Revision: $ $Date: $
- Author:
- Robert Stephan
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
search
(jakarta.ws.rs.core.UriInfo info, jakarta.servlet.http.HttpServletRequest request, String query, String sort, String wt, String start, String rows, List<String> fq, List<String> fl, String facet, String facetSort, String facetLimit, List<String> facetFields, String facetMinCount, String jsonWrf) see http://wiki.apache.org/solr/CommonQueryParameters for syntax of parameters
-
Field Details
-
FORMAT_JSON
- See Also:
-
FORMAT_XML
- See Also:
-
FORMAT_CSV
- See Also:
-
-
Constructor Details
-
MCRRestAPISearch
public MCRRestAPISearch()
-
-
Method Details
-
search
@GET @Produces({"text/xml;charset=UTF-8","application/json;charset=UTF-8","text/plain;charset=ISO-8859-1","text/plain;charset=UTF-8"}) public jakarta.ws.rs.core.Response search(@Context jakarta.ws.rs.core.UriInfo info, @Context jakarta.servlet.http.HttpServletRequest request, @QueryParam("q") String query, @QueryParam("sort") String sort, @QueryParam("wt") @DefaultValue("xml") String wt, @QueryParam("start") String start, @QueryParam("rows") String rows, @QueryParam("fq") List<String> fq, @QueryParam("fl") List<String> fl, @QueryParam("facet") String facet, @QueryParam("facet.sort") String facetSort, @QueryParam("facet.limit") String facetLimit, @QueryParam("facet.field") List<String> facetFields, @QueryParam("facet.mincount") String facetMinCount, @QueryParam("json.wrf") String jsonWrf) throws MCRRestAPIException see http://wiki.apache.org/solr/CommonQueryParameters for syntax of parameters- Parameters:
info
- - the injected Jersey URIInfo objectrequest
- - the injected HTTPServletRequest objectquery
- the Query in SOLR Query syntaxsort
- the sort parameter - syntax as defined by SOLRwt
- the format parameter - syntax as defined by SOLRstart
- the start parameter (number) - syntax as defined by SOLRrows
- the rows parameter (number) - syntax as defined by SOLRfq
- the filter query parameter - syntax as defined by SOLRfl
- the list of fields to be returned - syntax as defined by SOLRfacet
- the facet parameter (true to return facets) - syntax as defined by SOLRfacetFields
- the list of facetFields to be returned - syntax as defined by SOLRjsonWrf
- the name of the JSONP callback function - syntax as defined by SOLR- Returns:
- a Jersey Response Object
- Throws:
MCRRestAPIException
-