我用这些参数(首选项,filter_path)在邮递员中进行这种查询
[http://localhost:9200/dev-billing-cycle/_doc/_search?preference=xyzabc123&filter_path= hits.hits._id,hits.hits._source
在spring数据存储库中,我有一些查询,例如:
列表findByUserIdOrderByStartDateDesc(String userId);
我想在我的查询中包含这些参数?preference = xyzabc123&filter_path = hits.hits._id,hits.hits._source,但我不知道这是否可行或如何做到
我不知道spring是如何处理这些的,但是对于elasticsearch高级休息客户:
据我所知[eC0]不受Elasticsearch高级Rest客户支持。这样做的原因是,当客户端尝试从json之外创建响应对象时,此参数会精简响应json,并且此精简的json响应版本可能会导致解析失败。]
其他参数,即filter_path
可以如下设置:
preference