Best way to build a document with a fixed part and a variable part


#1

Hi Everyone,

I aim to ingest datas in ES documents.

My datas are pretty much like this ::
fixed_field1;fixed_field2;...;variable_field1;variable_field2;...

And then, I want to build ES documents like this ::
{
"fixed_field1_label":"fixed_field1",
"fixed_field2_label":"fixed_field2",
...,
"variable_field1_label":"variable_field1",
"variable_field2_label":"variable_field2",
...
}

The fixed part is very very common whereas the variable part is very unique.

I was wondering, in order to save space storage, if there was an approach to externalize the fixed part ? I saw things such as "nested" or "has_child" or "has_parent", but I fear that this make impossible querying throught Kibana or Grafana. Indeed, my documents must be readable by those kind of tools...

Thanks for your help :slight_smile: