Analyze method error

(Aarthini) #1

Header[] headers = {new BasicHeader("authorization", "Basic ZWxhc3RpYzplbGFzdGlj")};
RestHighLevelClient client = new RestHighLevelClient(
new HttpHost("ip", 9200, "http")));
String jsonString = "{"analyzer":"my_analyzer","text":"cat on the wall"}";
HttpEntity entity = new NStringEntity(jsonString, ContentType.APPLICATION_JSON);
Response response = client.getLowLevelClient().performRequest("GET", "tweet/_analyze, Collections.emptyMap(), entity);

while using this I m getting error "type":"security_exception","reason":"missing authentication token for REST request "

(David Pilato) #2

Did you read


(system) #3

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