Delete by id

Is there simple way to delete a document by id?
(without having to build a query)

On Wed, 2010-11-17 at 11:24 -0800, Mooky wrote:

Is there simple way to delete a document by id?
(without having to build a query)

curl -XDELETE 'http://127.0.0.1:9200/my_index/my_type/123'

Amazing what one can find in the docs :wink:

http://www.elasticsearch.com/docs/elasticsearch/rest_api/

Sorry. I didnt add some context to my question - Im working with the java
api.
(java api docs are pretty light/sparse)

-Nick

On 17 November 2010 19:53, Clinton Gormley clinton@iannounce.co.uk wrote:

On Wed, 2010-11-17 at 11:24 -0800, Mooky wrote:

Is there simple way to delete a document by id?
(without having to build a query)

curl -XDELETE 'http://127.0.0.1:9200/my_index/my_type/123'

Amazing what one can find in the docs :wink:

http://www.elasticsearch.com/docs/elasticsearch/rest_api/

Something wrong with this method on the client (the javadoc does not look
sparse to me, but if it does to you, you are more than welcomed to send a
pull request with improvements):

/**
 * Deletes a document from the index based on the index, type and id.
 *
 * @param index The index to delete the document from
 * @param type  The type of the document to delete
 * @param id    The id of the document to delete
 */
DeleteRequestBuilder prepareDelete(String index, String type, String

id);

On Thu, Nov 18, 2010 at 1:43 AM, Nick Minutello nick.minutello@gmail.comwrote:

Sorry. I didnt add some context to my question - Im working with the java
api.
(java api docs are pretty light/sparse)

-Nick

On 17 November 2010 19:53, Clinton Gormley clinton@iannounce.co.ukwrote:

On Wed, 2010-11-17 at 11:24 -0800, Mooky wrote:

Is there simple way to delete a document by id?
(without having to build a query)

curl -XDELETE 'http://127.0.0.1:9200/my_index/my_type/123'

Amazing what one can find in the docs :wink:

http://www.elasticsearch.com/docs/elasticsearch/rest_api/

My Bad. I was looking at prepareDeleteByQuery ... momentary
blindness :-/

On Nov 18, 12:04 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Something wrong with this method on the client (the javadoc does not look
sparse to me, but if it does to you, you are more than welcomed to send a
pull request with improvements):

/**
 * Deletes a document from the index based on the index, type and id.
 *
 * @param index The index to delete the document from
 * @param type  The type of the document to delete
 * @param id    The id of the document to delete
 */
DeleteRequestBuilder prepareDelete(String index, String type, String

id);

On Thu, Nov 18, 2010 at 1:43 AM, Nick Minutello nick.minute...@gmail.comwrote:

Sorry. I didnt add some context to my question - Im working with the java
api.
(java api docs are pretty light/sparse)

-Nick

On 17 November 2010 19:53, Clinton Gormley clin...@iannounce.co.ukwrote:

On Wed, 2010-11-17 at 11:24 -0800, Mooky wrote:

Is there simple way to delete a document by id?
(without having to build a query)

curl -XDELETE 'http://127.0.0.1:9200/my_index/my_type/123'

Amazing what one can find in the docs :wink:

http://www.elasticsearch.com/docs/elasticsearch/rest_api/