Hello Elastic community,
I'm seeking advice on how to efficiently create a second index containing only a subset of fields from a primary index based on certain conditions.
To provide some context, let's say I have a primary index containing documents with 10 fields. However, I'm interested in creating a secondary index that includes only two specific fields (e.g., client IP and client MAC) from the primary index, under the condition that both of these fields exist in the document.
It's important to note that I'm unable to use Logstash for this task due to certain constraints.
Essentially, when a particular condition is met (e.g., both client IP and client MAC fields exist), I'd like to write a document to the secondary index with only these two fields.
I'd appreciate any advice or suggestions on how to approach this task efficiently using Elasticsearch.
Thank you in advance for your help and insights!
Best regards