Most of the access to ES on the Internet is about TCP access. But the grass mud mama always reported configuration problems.
Let's use REST services first. Grass mud. FUCK YOU .ELASEARCH! FUCK YOU. Those slings configured the elasticsearch.yml configuration file for a single machine but did not publish it. FUCK YOU!!!!
@RequestMapping("/getesdata")
@ResponseBody
public Map<String, Object> sendJson2ES(){
Map<String, Object> varsRequest = new HashMap<String, Object>();
Map<String, Object > queryContent = new HashMap<String, Object>();
Map<String, Object> matchContent = new HashMap<String, Object>();
queryContent.put("match_all", matchContent);
varsRequest.put("query", queryContent);
String strTemp4 = varsRequest.toString();
Map<String, Object> varsResponse = restTemplate.postForObject("http:
return varsResponse;
}
Access ES for query through REST service
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326026112&siteId=291194637
Ranking