Handling document deletion


(Bibin Abraham) #1

Hi,

My app's backend is MySQL. However, I am not using jdbc river as I want the
search to be as realtime as possible. Can you confirm whether this method
will work out in case of document deletion:

  1. ttl will be enabled for each type
  2. Since document deletion is expensive, when a new document is deleted, I
    will set the ttl for that document to the next weekend. In this way, all
    documents will be automatically deleted every week rather than at that
    particular time.
  3. Searching will always filter documents on ttl

Because of FK constraint like ON DELETE CASCADE, multiple rows might get
deleted in MySQL automatically. What is the best way to handle this type of
scenario in ES? I was thinking about putting info about the related
indexes+types in type._meta?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Bibin Abraham) #2

Please help

Regards

bin

On Thursday, 26 September 2013 19:42:51 UTC+5:30, bin wrote:

Hi,

My app's backend is MySQL. However, I am not using jdbc river as I want
the search to be as realtime as possible. Can you confirm whether this
method will work out in case of document deletion:

  1. ttl will be enabled for each type
  2. Since document deletion is expensive, when a new document is deleted, I
    will set the ttl for that document to the next weekend. In this way, all
    documents will be automatically deleted every week rather than at that
    particular time.
  3. Searching will always filter documents on ttl

Because of FK constraint like ON DELETE CASCADE, multiple rows might get
deleted in MySQL automatically. What is the best way to handle this type of
scenario in ES? I was thinking about putting info about the related
indexes+types in type._meta?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3