Hi,
In my index, i have field which is optional. So, while i am indexing, i don't index this field. If it required then i add this field with update. This work just fine for me but problem is if i need to reindex that doc, i loose optional field.
Let me explain it with an example;
let's say i index this,
{
"id":"123"
"user":"xyz",
"message":"sample message"
}
then an update request came:
{
"id":"123"
"user":"xyz",
"message":"sample message"
"optional_field":"some data"
}
then when an reindex request came for this id, it became like this
{
"id":"123"
"user":"xyz",
"message":"updated sample message"
}
i look at upsert in order to if doc is exist then update id, user and message field only but with upsert i couldn't use version control.
I can't put optional field to index definition because then i have to set some default value when i am indexing and if doc is already exist then it will override it
So, i am wondering if it is possible to index data partially, so i wouldn't loose optional field.