Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | About

21.10. Count

		
QueryBuilders qb = QueryBuilders.boolQuery().must(QueryBuilders.termQuery("status", false));  
  
CountResponse response = client.prepareCount("book") // 索引  
                .setQuery(qb) //類型  
                .get();