Class IndexResource
java.lang.Object
io.goobi.viewer.api.rest.v1.index.IndexResource
- Author:
- florian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<GeoMapFeature> createFeatures(String query, String coordinateQuery, String labelConfig, String searchScope) getGeoJsonResuls(String solrField, String wktRegion, String filterQuery, String facetQuery, String labelField, String searchScope) getHeatmap(String solrField, String wktRegion, String filterQuery, String facetQuery, Integer gridLevel) getItemMetadataList(String config) getMarkerMetadataList(String config) getStatistics(String query) jakarta.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:
IndexUnreachableExceptionPresentationException
-
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:
IndexUnreachableExceptionViewerConfigurationExceptionDAOExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
stream
@POST @Path("/stream") @Consumes("text/plain") @Produces("application/json") public jakarta.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:
IOExceptionIndexUnreachableException
-
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, @QueryParam("scope") String searchScope) throws IndexUnreachableException, PresentationException -
createFeatures
protected Collection<GeoMapFeature> createFeatures(String query, String coordinateQuery, String labelConfig, String searchScope) throws PresentationException, IndexUnreachableException -
getMarkerMetadataList
-
getItemMetadataList
-