Class IndexResource
java.lang.Object
io.goobi.viewer.api.rest.v1.index.IndexResource
- Author:
- florian
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetGeoJsonResuls
(String solrField, String wktRegion, String filterQuery, String facetQuery, String labelField) getHeatmap
(String solrField, String wktRegion, String filterQuery, String facetQuery, Integer gridLevel) getStatistics
(String query) javax.ws.rs.core.StreamingOutput
-
Constructor Details
-
IndexResource
public IndexResource()
-
-
Method Details
-
getStatistics
@GET @Path("/statistics") @Produces("application/json") public String getStatistics(@QueryParam("query") String query) throws IndexUnreachableException, PresentationException - Parameters:
query
-- Returns:
- Indexed records statistics as JSON
- Throws:
IndexUnreachableException
PresentationException
-
getRecordsForQuery
@POST @Path("/query") @Consumes("application/json") @Produces("application/json") public String getRecordsForQuery(RecordsRequestParameters params) throws IndexUnreachableException, ViewerConfigurationException, DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Parameters:
params
-- Returns:
- Records as JSON
- Throws:
IndexUnreachableException
ViewerConfigurationException
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
stream
@POST @Path("/stream") @Consumes("text/plain") @Produces("application/json") public javax.ws.rs.core.StreamingOutput stream(String expression) - Parameters:
expression
-- Returns:
StreamingOutput
-
getAllIndexFields
@GET @Path("/fields") @Produces("application/json") public List<SolrFieldInfo> getAllIndexFields() throws IOException- Returns:
- List
- Throws:
IOException
-
getHeatmap
@GET @Path("/spatial/heatmap/{solrField}") @Produces("application/json") public String getHeatmap(@PathParam("solrField") String solrField, @QueryParam("region") @DefaultValue("[\"-180 -90\" TO \"180 90\"]") String wktRegion, @QueryParam("query") @DefaultValue("*:*") String filterQuery, @QueryParam("facetQuery") @DefaultValue("") String facetQuery, @QueryParam("gridLevel") Integer gridLevel) throws IndexUnreachableException - Parameters:
solrField
-wktRegion
-filterQuery
-facetQuery
-gridLevel
-- Returns:
- Heatmap as
String
- Throws:
IOException
IndexUnreachableException
-
getGeoJsonResuls
@GET @Path("/spatial/search/{solrField}") @Produces("application/json") public String getGeoJsonResuls(@PathParam("solrField") String solrField, @QueryParam("region") @DefaultValue("[\"-180 -90\" TO \"180 90\"]") String wktRegion, @QueryParam("query") @DefaultValue("*:*") String filterQuery, @QueryParam("facetQuery") @DefaultValue("") String facetQuery, @QueryParam("labelField") String labelField) throws IndexUnreachableException, PresentationException
-