You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch version (bin/elasticsearch --version):
Elasticsearch 7.6.1 Plugins installed: []
Nest 7.6.1 JVM version (java -version):
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, sharing) OS version (uname -a if on a Unix-like system):
Linux c87e626860d1 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
I have a big index that keeps historical data and only the documents within the last month are being updated so using index rollover seems perfect for this use case.
The problem is that I need to be able to update/delete last month records but when the rollover happens I end up with duplicate documents with the same ID.
It seems that rollover works only with data that never gets updated, like application logs.
Steps to reproduce:
Although my scenario is to edit last month entries this reproduces whenever the rollover happens and one document gets updated. So it doesn't matter if it's one month or one day.
Setup ILM policy with max 2 documents
PUT /mytest/_doc/1
{
"name" : "Name1"
}
PUT /mytest/_doc/2
{
"name" : "Name2"
}
PUT /mytest/_doc/3
{
"name" : "Name3"
}
Make a document update
PUT /mytest/_doc/1
{
"name" : "Name1111"
}
Query for the documents and notice that the document with ID=1 is duplicated
GET /mytest/_search
I understand that only one index is writable and the original document cannot be updated but because I'm using the alias I was expecting to get only the latest document which is stored in the active writable index.
The text was updated successfully, but these errors were encountered:
Elasticsearch version (
bin/elasticsearch --version
):Elasticsearch 7.6.1
Plugins installed: []
Nest 7.6.1
JVM version (
java -version
):OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, sharing)
OS version (
uname -a
if on a Unix-like system):Linux c87e626860d1 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
I have a big index that keeps historical data and only the documents within the last month are being updated so using index rollover seems perfect for this use case.
The problem is that I need to be able to update/delete last month records but when the rollover happens I end up with duplicate documents with the same ID.
It seems that rollover works only with data that never gets updated, like application logs.
Steps to reproduce:
Although my scenario is to edit last month entries this reproduces whenever the rollover happens and one document gets updated. So it doesn't matter if it's one month or one day.
Setup ILM policy with max 2 documents
Insert documents and wait for rollover to happen
Make a document update
Query for the documents and notice that the document with ID=1 is duplicated
I understand that only one index is writable and the original document cannot be updated but because I'm using the alias I was expecting to get only the latest document which is stored in the active writable index.
The text was updated successfully, but these errors were encountered: