Deleting data while indexing

Hi all,
I have a case where i need to delete data while it is indexing, to stop the process. Is this possible and if yes, can you explain me how to do it? The case is as follow i want to delete a report while it is uploading and some data is calculated in the backend. The problem is, when i send a delete query it actually delete the data which is already calculated, but because the process is still on going the backend still send data to elastic. So when i refresh the page, and fetch all uploaded reports, the one that i already deleted, appears with the data received after the delete request has been send. For example if the whole report should have 100 rows of data and i delete in the middle of calculaltion up to 58 rows, on refresh i will receive the next 42 rows, so my goal is to stop the process of indexing and not to receive any more data connected to this report. Thank you in advance :slight_smile:

What is indexing the data?

Hey,
the backend is sending data to elastic to index it.
Not sure if this is the answer that you wanted if you need more details, please let me know. Thansk!

So what about stopping sending documents from the backend?

have you looked into blocking writes on your index? Index blocks | Elasticsearch Guide [8.11] | Elastic

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.