I am a beginner to elastic so beware.
I am attempting to create a date field that will update based on a certain value in another field.
A change is made to the complete field such as:
I'm thinking a scripted field may be the best way to go, but I am not sure.
A scripted field is always calculated as the data is queried, so it would always show the current date for any doc which had
Complete: Yes. I'm guessing you want it to indicate the date it was completed?
We should take a step back and ask how your data is getting into Elasticsearch. The two main ways are
- time-based data where each doc has a timestamp and you can trend things over time and aggregate data based on time intervals (connections per hour, etc). These docs are usually not updated once they are ingested into Elasticsearch.
- the other common way is things that are not time-based. Like inventory items which could have a quantity that gets updated. Or some other docs which start out with
Complete: No and get updated to
If you are updating docs to indicate when they are completed, that same task could update the
Complete_Date: with the current date.
How you do that depends on how that data is getting written into Elasticsearch. If you can explain more of that I can provide more detailed steps.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.