Exemplo n.º 1
0
 @Override
 public IndexStat getIndexStat() {
   CountRequestBuilder countRequest =
       client
           .prepareCount(this.getIndexName())
           .setTypes(this.getIndexType())
           .setQuery(QueryBuilders.matchAllQuery());
   CountResponse response = countRequest.get();
   return new IndexStat(getLastSynchronization(), response.getCount());
 }
Exemplo n.º 2
0
 public Long countAll() {
   return client.prepareCount(this.getIndexName()).setTypes(this.getIndexType()).get().getCount();
 }