Java API - Having problem by searching data on kibana

SearchRequest request = new SearchRequest();
request.source(new SearchSourceBuilder().query(QueryBuilders.wrapperQuery(queryString)));
SearchResponse response =, RequestOptions.DEFAULT);

I am using this java code to get search results from kibana. but i am getting below error:

{"error":{"root_cause":[{"type":"parsing_exception","reason":"unknown query [query]","line":2,"col":12}],"type":"parsing_exception","reason":"unknown query [query]","line":2,"col":12,"caused_by":{"type":"named_object_not_found_exception","reason":"[2:12] unknown field [query]"}},"status":400}

Welcome to our community! :smiley:

I don't know java, but why are you querying Kibana here, and not Elasticsearch?

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