Hey, this is a pretty simple question but after much searching I'm still
stumped. Basically I want to create a delete by query that deletes the
first n documents from a given index. The only thing I found relating to
restricting the size were the from/size parameters http://www.elasticsearch.org/guide/reference/api/search/from-size/ but as
far as I'm aware that isn't compatible with the query DSL. I also found the limit query but that only limits the documents to retrieve per shard. I'm
probably missing something really obvious but I'm completely stumped.
a delete by query will delete all documents that match the query not just
the top N results. How do you define the first N? are they the oldest docs
in the index? maybe you can give some details so we can help better.
simon
On Wednesday, May 15, 2013 11:21:08 PM UTC+2, Jim Flim wrote:
Hey, this is a pretty simple question but after much searching I'm still
stumped. Basically I want to create a delete by query that deletes the
first n documents from a given index. The only thing I found relating to
restricting the size were the from/size parameters Elasticsearch Platform — Find real-time answers at scale | Elastic but as
far as I'm aware that isn't compatible with the query DSL. I also found the limit query but that only limits the documents to retrieve per shard.
I'm probably missing something really obvious but I'm completely stumped.
Yea basically I want a query that matches all docs of an index and deletes
the oldest n documents
On May 15, 2013 5:24 PM, "simonw" simon.willnauer@elasticsearch.com wrote:
Hey,
a delete by query will delete all documents that match the query not just
the top N results. How do you define the first N? are they the oldest docs
in the index? maybe you can give some details so we can help better.
simon
On Wednesday, May 15, 2013 11:21:08 PM UTC+2, Jim Flim wrote:
Hey, this is a pretty simple question but after much searching I'm still
stumped. Basically I want to create a delete by query that deletes the
first n documents from a given index. The only thing I found relating to
restricting the size were the from/size parameters http://www.** Elasticsearch Platform — Find real-time answers at scale | Elastichttp://www.elasticsearch.org/guide/reference/api/search/from-size/ but
as far as I'm aware that isn't compatible with the query DSL. I also found
the limit query but that only limits the documents to retrieve per
shard. I'm probably missing something really obvious but I'm completely
stumped.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.