Skip to content

Commit

Permalink
Elasticsearch / API / Allows ndjson.
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Oct 10, 2024
1 parent 8edcf8d commit 34eb727
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions services/src/main/java/org/fao/geonet/api/es/EsHTTPProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,15 @@ public void search(
description = "The multi search API executes several searches from a single API request. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html for search parameters, and https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html Query DSL.")
@RequestMapping(value = "/search/records/_msearch",
method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_NDJSON_VALUE},
consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_NDJSON_VALUE})
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Search results.",
content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(type = "string")))
content = {
@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(type = "string")),
@Content(mediaType = MediaType.APPLICATION_NDJSON_VALUE, schema = @Schema(type = "string"))
}
)
})
@ResponseStatus(value = HttpStatus.OK)
@ResponseBody
Expand Down

0 comments on commit 34eb727

Please sign in to comment.