首页 > 解决方案 > 如何在弹性搜索中的 Rest 高级客户端中传递 json 查询

问题描述

在用于检索数据的弹性搜索中,我尝试通过apache http clientand 传递 json 查询elastic search rest high level client,是否有任何其他灵活的方法可以使用 java API 传递 json 查询???任何帮助将不胜感激提前谢谢


String query="";
SearchModule searchModule..
XContentParser parser = XContentFactory.xContent(XContentType.JSON).createParser(new NamedXContentRegistry(searchModule
            .getNamedXContents()), query)

标签: elasticsearchelasticsearch-java-api

解决方案


推荐阅读