Analyzer in Java API

(Aarthini) #1

I want to analyze a phrase in java .
I'm using this code
Header[] headers = {new BasicHeader("authorization", "Basic ZWxhc3RpYzplbGFzdGlj")};
RestHighLevelClient client = new RestHighLevelClient(
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 .

(David Pilato) #2

Analyze API has not been implemented yet in HLClient:

Use the low level instance instead for now.

(Aarthini) #3

Ok Thank you.

(system) #4

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