我使用
ElasticsearchOperations
来实现更新操作。
esOperations.update(
UpdateQuery.builder(old.id.toString())
.withDocument(Document.from(mapOf("browsed" to item.browsed)))
.withRefreshPolicy(
RefreshPolicy.IMMEDIATE
)
.build(),
IndexCoordinates.of("t_telegram_message")
)
但是无法正常工作,post请求是
POST /t_telegram_message/_update/6150?refresh=false
我期望的是请求参数是
refresh=true
。
我该怎么办?
依赖关系:
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>5.0.3</version>
这是 Spring Data Elasticsearch 中的一个错误,感谢您的报告;我刚刚在 main 中修复了它,并将其向后移植到 5.1 和 5.0 分支。