public Long countAll() {
return getClient().prepareCount(this.getIndexName())
.setTypes(this.getIndexType())
.get().getCount();
}
<BUG>public Map<String, Long> countByField(IndexField indexField, FilterBuilder filter) {
Map<String, Long> counts = new HashMap<String, Long>();
Terms values = getClient().prepareSearch(this.getIndexName())
</BUG>
.setTypes(this.getIndexType())

public Long countAll() {
return getClient().prepareCount(this.getIndexName())
.setTypes(this.getIndexType())
.get().getCount();
}
public Map<String, Long> countByField(IndexField indexField, FilterBuilder filter) {
StopWatch fullProfile = profiling.start("es", Profiling.Level.FULL);
StopWatch basicProfile = profiling.start("es", Profiling.Level.BASIC);
Map<String, Long> counts = new HashMap<String, Long>();
SearchRequestBuilder request = getClient().prepareSearch(this.getIndexName())
.setTypes(this.getIndexType())
