TestMapper 和 esdsl/test.esdsl 文件内容
https://github.com/manymobi/esdsl-core/blob/master/images/esdsl.png
@Mapper("esdsl/test.esdsl")
public interface TestMapper {
JSONObject search(@Param("content") String content);
JSONObject search1(@Param("sssss") String sssss, @Param("list") List list);
@Query("{\"ssss\":#{sssss},\"integer\":#{integer}}")
@RequestMapping(method = RequestMethod.GET, value = "/v")
JSONObject search2(@Param("sssss") String sssss, @Param("integer") Integer integer);
@RequestMapping(method = RequestMethod.GET, value = "/v")
JSONObject search3(@RequestBody String sssss);
}
==> search
GET /index/${fulltext}/_search
{
"query" : {
#if(232=="rwerwe")
"match" : {
"id" :123133131223123212313131
}
#endif
},
"highlight" : {
"pre_tags" : ["<tag1>", "<tag2>"],
"post_tags" : ["</tag1>", "</tag2>"],
"fields" : {
"content" : #{content}
}
}
}