How to search with elasticsearch-client (io.reactiverse.elasticsearch.client)

469 views
Skip to first unread message

naft...@zoozbit.com

unread,
Apr 30, 2019, 10:43:35 AM4/30/19
to vert.x
hi i'm trying to search or get an entire index, but the search REST API doesnt work for me.

         SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder().query(QueryBuilders.matchAllQuery());
SearchRequest searchRequest = new SearchRequest("post*").source(searchSourceBuilder);
client.searchAsync(searchRequest, RequestOptions.DEFAULT, new Handler<AsyncResult<SearchResponse>>() {
@Override
public void handle(AsyncResult<SearchResponse> arg0) {
// TODO Auto-generated method stub
System.out.println(arg0);
}
});

and this is the exception i'm getting 

cause=Elasticsearch exception [type=illegal_argument_exception, reason=request [/post*/_search] contains unrecognized parameter: [ccs_minimize_roundtrips]]


when using GetRequest all works good but you must provide an id pram for GET..so this is not a solution that good for my case
Reply all
Reply to author
Forward
0 new messages