elasticsearch 为什么有时候Elasticsearch滚动或搜索返回一组无法单独检索的文档ID?,elasticsearch,elassandra,elasticsearch,Elassandra" /> elasticsearch 为什么有时候Elasticsearch滚动或搜索返回一组无法单独检索的文档ID?,elasticsearch,elassandra,elasticsearch,Elassandra" />

elasticsearch 为什么有时候Elasticsearch滚动或搜索返回一组无法单独检索的文档ID?

elasticsearch 为什么有时候Elasticsearch滚动或搜索返回一组无法单独检索的文档ID?,elasticsearch,elassandra,elasticsearch,Elassandra,我看到一个奇怪的问题,Elasticsearch scroll或search API返回一组我无法再通过ID获取的文档。我正在使用Elassandra(Cassandra+ES),它使用Elasticsearch作为二级索引存储。Cassandra记录上有TTL,由于TTL而被删除,但ID仍在Elasticsearch中。为什么会有这种奇怪的行为?我在Elasticsearch上刷新并强制合并了相应的索引,但没有任何帮助。好的。我发现了问题。Cassandra上的TTL字段删除Cassandra

我看到一个奇怪的问题,Elasticsearch scroll或search API返回一组我无法再通过ID获取的文档。我正在使用Elassandra(Cassandra+ES),它使用Elasticsearch作为二级索引存储。Cassandra记录上有TTL,由于TTL而被删除,但ID仍在Elasticsearch中。为什么会有这种奇怪的行为?我在Elasticsearch上刷新并强制合并了相应的索引,但没有任何帮助。

好的。我发现了问题。Cassandra上的TTL字段删除Cassandra上的记录,但基于Elasticsearch构建的自定义二级索引Elassandra不会被该机制删除。事实上,TTL在更高版本的ES上已经不存在了。文档需要从ES中显式删除,或者我们需要在ES上使用时间分区索引,以便只删除旧索引