How to delete and what to use


#1

Elasticsearch seems to be moving really quickly with changes.

I am trying to figure out 1 way of deleted data, not multiple ways.

I just installed the delete-by-query plugin. I have a few questions:

  1. How do I actually use the plugin? is it in the elasticsearch/bin folder? what is the command? I already installed it but I dont see it anywhere on my ubuntu?

  2. How do I delete by time range using the timestamp?

  3. Should I be using sensa or one of the plugins to delete data?


(David Pilato) #2

Are you looking for the documentation? It's there: https://www.elastic.co/guide/en/elasticsearch/plugins/2.2/plugins-delete-by-query.html


#3

You call that documentation?
How do I run it?


(David Pilato) #4

What you did not understand in doc ?

It seems pretty clear to me.

May be you did not notice the link "using delete by query"? https://www.elastic.co/guide/en/elasticsearch/plugins/2.2/delete-by-query-usage.html


#5

How am I supposed to access the executable?

Here is what I get:

ubuntu@ip-10-0-0-230:~$ DELETE /member_type_history/Member Type/_query?q=user:kimchy
DELETE: command not found

I dont get how to run this against my ES?


(David Pilato) #6

It's a SENSE format. You can copy and paste it to sense.

From the command line, use curl.

curl -XDELETE localhost:9200/member_type_history/Member Type/_query?q=user:kimchy

#7

Ok, could you help me with 1 more thing?

How do I use a timestamp range using that syntax?


(David Pilato) #8

You need to use the QueryDSL


(system) #9