コード例 #1
0
 @Override
 public <T> FacetedPage<T> queryForPage(
     StringQuery query, Class<T> clazz, SearchResultMapper mapper) {
   SearchResponse response =
       prepareSearch(query, clazz).setQuery(query.getSource()).execute().actionGet();
   return mapper.mapResults(response, clazz, query.getPageable());
 }
コード例 #2
0
 @Override
 public <T> Page<T> scroll(String scrollId, long scrollTimeInMillis, SearchResultMapper mapper) {
   SearchResponse response =
       client
           .prepareSearchScroll(scrollId)
           .setScroll(TimeValue.timeValueMillis(scrollTimeInMillis))
           .execute()
           .actionGet();
   return mapper.mapResults(response, null, null);
 }
コード例 #3
0
 @Override
 public <T> FacetedPage<T> queryForPage(
     SearchQuery query, Class<T> clazz, SearchResultMapper mapper) {
   SearchResponse response = doSearch(prepareSearch(query, clazz), query);
   return mapper.mapResults(response, clazz, query.getPageable());
 }