# Remove Data?

**URL:** <https://discuss.elastic.co/t/remove-data/95710>\
**Category:** Elasticsearch\
**Created:** [August 3, 2017, 12:14pm UTC](https://discuss.elastic.co/t/remove-data/95710 "2017-08-03T12:14:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![realtek](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@realtek](https://discuss.elastic.co/u/realtek)\
**Post date:** [August 3, 2017, 12:14pm UTC](https://discuss.elastic.co/t/remove-data/95710/1 "2017-08-03T12:14:35Z")

</div>

Hi,

I am new to elasticsearch and think its amazing from what I have seen.

I have a question, if I were to use this in my application. For example if I have a website that inserts data into a database, I assume at the same time as inserting the data, it should send a request to elasticsearch to also insert the record?

If this is the case, What would be the recommendation for when data is deleted from the database? Do I need to ensure the elasticsearch record is also deleted?

Another option is to create some type of worker process which does this functionality and compares/synchronises the two?

I just wondered what other people did and what the suggestions are.

Thank you

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 3, 2017, 12:36pm UTC](https://discuss.elastic.co/t/remove-data/95710/2 "2017-08-03T12:36:44Z")

</div>

> I assume at the same time as inserting the data, it should send a request to elasticsearch to also insert the record?

Yes

> Do I need to ensure the elasticsearch record is also deleted?

Yes

> Another option is to create some type of worker process which does this functionality and compares/synchronises the two?

Yes but this is hard so I definitely prefer the former options.

I wrote about all that here:

> **[Advanced search for your Legacy application - David Pilato](https://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/)**
>
> I gave recently a talk at Voxxed Istanbul 2015 and I’d like to share here the story of this talk.
> The talk was about adding a real search engine for your legacy application. Here “legacy” means an application which is still using SQL statements to...

Last time I spoke about it:

[![](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06541cff9aa36f21755c57898cfc870389b249a3.jpeg "Advanced search for your legacy application by David Pilato") ](https://www.youtube.com/watch?v=xcilf8rvrZw)

---

<div class="post-metadata">

**Author:** ![realtek](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@realtek](https://discuss.elastic.co/u/realtek)\
**Post date:** [August 3, 2017, 3:44pm UTC](https://discuss.elastic.co/t/remove-data/95710/3 "2017-08-03T15:44:32Z")

</div>

Hi David,

Thank you for your response and answering my questions.

Thats a brilliant detailed post and I will watch the video, looks great.

Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 31, 2017, 3:44pm UTC](https://discuss.elastic.co/t/remove-data/95710/4 "2017-08-31T15:44:47Z")

</div>

Closed on August 31, 2017, 3:44pm UTC

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