eg.
request url : http://localhost:9200/testlog/_count
request body :
{
"query":{
"bool":{
"should":[{
"match":{
"operator":"abcd"
}},
{"match":{
"content":"测试"
}}
]
}
}
}
how to use java api by transportclient?
SearchResponse response = client.prepareSearch(indexs.split(","))
.setTypes(types.split(","))
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
.setQuery(QueryBuilders.boolQuery()) // Query
.setExplain(true)
.get();
Has it have Similar query methods like Java API?