Spring data elasticsearch RestHighLevelClient选项参数

问题描述 投票:0回答:1

我用这些参数(首选项,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,但我不知道这是否可行或如何做到

elasticsearch spring-data options query-parameters
1个回答
0
投票

我不知道spring是如何处理这些的,但是对于elasticsearch高级休息客户:

据我所知[eC0]不受Elasticsearch高级Rest客户支持。这样做的原因是,当客户端尝试从json之外创建响应对象时,此参数会精简响应json,并且此精简的json响应版本可能会导致解析失败。]

其他参数,即filter_path可以如下设置:

preference
© www.soinside.com 2019 - 2024. All rights reserved.