How to _count command by transportclient in v5.3.0?

(Kervin) #1


request url : http://localhost:9200/testlog/_count
request body :



how to use java api by transportclient?

SearchResponse response = client.prepareSearch(indexs.split(","))
.setQuery(QueryBuilders.boolQuery()) // Query

Has it have Similar query methods like Java API?

(Nik Everett) #2

Setting the size to 0 should pretty much do it.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.