示例#1
0
 /** SEARCH /_search/prices/:query -> search for the price corresponding to the query. */
 @RequestMapping(
     value = "/_search/prices/{query}",
     method = RequestMethod.GET,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public List<Price> search(@PathVariable String query) {
   return StreamSupport.stream(
           priceSearchRepository.search(queryString(query)).spliterator(), false)
       .collect(Collectors.toList());
 }