I want to analyze a phrase in java .
I'm using this code
Header[] headers = {new BasicHeader("authorization", "Basic ZWxhc3RpYzplbGFzdGlj")};
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(
new HttpHost("ip", 9200, "http")));
AnalyzeRequest request = (new AnalyzeRequest("this is a test")).analyzer("my_analyzer");
AnalyzeResponse ar = client.analyze(request).actionGet().detail();
But I m getting error in "client.analyze(request).actionGet().detail();". There is no analyze method in RestHighLevelClient .
Analyze API has not been implemented yet in HLClient:
Use the low level instance instead for now.
Ok Thank you.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.