コード例 #1
0
 @RequestMapping(method = RequestMethod.POST)
 @ResponseBody
 public List<Document> searchConnection(
     @ModelAttribute final ConnectionSearchRequest searchRequest) {
   final SearchResult searchResult =
       searchService.search(
           asList(Index.WATERTAX.toString()),
           asList(IndexType.CONNECTIONSEARCH.toString()),
           searchRequest.searchQuery(),
           searchRequest.searchFilters(),
           Sort.NULL,
           Page.NULL);
   return searchResult.getDocuments();
 }
コード例 #2
0
 @RequestMapping(value = "/common/searchapplication", method = RequestMethod.POST)
 @ResponseBody
 public String searchApplication(@RequestBody final ApplicationSearchRequest searchRequest) {
   String applicationNumber =
       searchRequest.getApplicationNumber() != null
           ? "\"" + searchRequest.getApplicationNumber() + "\""
           : "";
   searchRequest.setApplicationNumber(applicationNumber);
   final SearchResult searchResult =
       searchService.search(
           asList(Index.APPLICATION.toString()),
           asList(IndexType.APPLICATIONSEARCH.toString()),
           searchRequest.searchQuery(),
           searchRequest.searchFilters(),
           Sort.NULL,
           Page.NULL);
   return convertSearchResultToJson(searchResult);
 }