I have the index where I store data. My question is whether I can restore the data that meet some conditions to a new index by using script reindexing so I can visualize the data properly.
Basically I'm thinking about something like that:
"script": {
"source": "if id has suffix = "ap" && suffix = "bn" within 60 mins move data from index1 to index2"
}
If I cannot do it with reindexing what can I use instead?
I'm sorry, I'm not sure I understand the requirement fully. You can use scripts, for suffix/prefix checks on the id, but that 60 minute check I am not sure about. There is no notion of a cronjob for this, but you can trigger this manually every 60 minutes, and filter documents based on a timestamp?
There are different id numbers (1563866656876839) and two possible suffixes (mt/dn).
We parse it with logstash and store these messages in one index.
When the id number with mt suffix gots dn suffix within 1 hour it means GOOD and it should get a new field status with approved value in it. If not the field value should be disapproved.
So in the end a new index isn't needed But I'm still curious how to achieve that and if it is even possible to create and fill the new field in document based on a time condition or how to say...
I see. So what I think you want is to create a connection between two log lines, like capturing start and end.
If you can parse the logline so that Aweg3AOMTs_1563866656876839 becomes it's own field, you could maybe take a look at data frames to create a summary index, that contains information if a document has a start and end time and thus is in a good state.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.