Is there a way to return only one result in a query?

I am using the update by query pluginhttps://github.com/yakaz/elasticsearch-action-updatebyquery
. I only want to update one of the elements that match my query at a
time and the "size=1" is not working. Is there any other possibility to set
the number of returned elements to 1.

Thanks for the info.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/24ed5bec-c3e3-4969-b62d-d6d479aabf53%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Any clue?

What I actually want is just a "update (table) set (column) where
(predicate) order by (column) desc limit 1" in sql syntax. Is that possible
at all in ES???

Thanks!

El jueves, 19 de diciembre de 2013 15:52:21 UTC+1, Adrian Luna escribió:

I am using the update by query pluginhttps://github.com/yakaz/elasticsearch-action-updatebyquery
. I only want to update one of the elements that match my query at a
time and the "size=1" is not working. Is there any other possibility to set
the number of returned elements to 1.

Thanks for the info.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d7b9cb4f-0129-446d-87a3-38597302644c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Any clue?

What I actually want is just a "update () set () where () limit 1" in sql
syntax.
If possible, also with an aditional "order by (column) desc".

Is that possible at all in ES???

Thanks!

El jueves, 19 de diciembre de 2013 15:52:21 UTC+1, Adrian Luna escribió:

I am using the update by query pluginhttps://github.com/yakaz/elasticsearch-action-updatebyquery
. I only want to update one of the elements that match my query at a
time and the "size=1" is not working. Is there any other possibility to set
the number of returned elements to 1.

Thanks for the info.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b18371ed-5112-47e7-ae25-c002c9448156%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Why do you want to do this? For test purpose?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 20 décembre 2013 at 09:49:09, Adrian Luna (adrian.luna.cobos@gmail.com) a écrit:

Any clue?

What I actually want is just a "update () set () where () limit 1" in sql syntax.
If possible, also with an aditional "order by (column) desc".

Is that possible at all in ES???

Thanks!

El jueves, 19 de diciembre de 2013 15:52:21 UTC+1, Adrian Luna escribió:
I am using the update by query plugin . I only want to update one of the elements that match my query at a time and the "size=1" is not working. Is there any other possibility to set the number of returned elements to 1.

Thanks for the info.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b18371ed-5112-47e7-ae25-c002c9448156%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.52b40d4c.580bd78f.111%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.

I want to have several processes reindexing documents with updated
information if it isn't already updated/being updated by other process.
Thus, with the query I'll check a flag, and update its state to processing
(atomic operation). The next process will come up and select a still
non-processed document, since the flag is updated.

I guess if the plugin allows to do this for the complete set of matched
documents, it should be possible to do it for just 1 doc.

Thanks in advance.

El viernes, 20 de diciembre de 2013 10:26:36 UTC+1, David Pilato escribió:

Why do you want to do this? For test purpose?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 20 décembre 2013 at 09:49:09, Adrian Luna (adrian.l...@gmail.com<javascript:>)
a écrit:

Any clue?

What I actually want is just a "update () set () where () limit 1" in sql
syntax.
If possible, also with an aditional "order by (column) desc".

Is that possible at all in ES???

Thanks!

El jueves, 19 de diciembre de 2013 15:52:21 UTC+1, Adrian Luna escribió:

I am using the update by query pluginhttps://github.com/yakaz/elasticsearch-action-updatebyquery
. I only want to update one of the elements that match my query at a
time and the "size=1" is not working. Is there any other possibility to set
the number of returned elements to 1.

Thanks for the info.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b18371ed-5112-47e7-ae25-c002c9448156%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a8221681-276b-49ec-bf03-e26c93c042b1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.