/** * SEARCH /_search/labels?query=:query : search for the label corresponding to the query. * * @param query the query of the label search * @return the result of the search */ @RequestMapping( value = "/_search/labels", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public List<Label> searchLabels(@RequestParam String query) { log.debug("REST request to search Labels for query {}", query); return StreamSupport.stream( labelSearchRepository.search(queryStringQuery(query)).spliterator(), false) .collect(Collectors.toList()); }