Hi all, and sorry for my poor english.
I need to build a delete by query request.
My porpose is to delete 'activity' elements in 'activities' array where 'creationDate' is less than some date.
My index mapping is
Can you suggest samples? I can fetch the activities array using script, I can remove an element but I can't find how to reassign this reduced array to main document
I don't have such scripts.
I believe that you have to create a new array, iterate over the old one, check the date and if needed send the object to the new array.
At the end set the new array as the value for the field activities.
But I'm wondering about the usecase.
If this is a one time operation because you need to fix your dataset, that would be fine.
But if you're doing that every x minutes, I don't think it will be super efficient.
May be explain the use case with sole concrete data?
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.