I have a case where I need to find out if any documents match a given
query, but I don't need the result set, or even a count of the result.
What is the most efficient way to do this, and is there room for a new
feature in ES tailored to this case? I'm currently using the count API, but
I suspect even that is doing more work than I actually need.
I don't think there is anything like this for queries. You can do a HEAD
request for a specific document, but not for searches. I would do the
query with a size of 0 using the query and fetch search type for the
fastest execution.
I have a case where I need to find out if any documents match a given
query, but I don't need the result set, or even a count of the result.
What is the most efficient way to do this, and is there room for a new
feature in ES tailored to this case? I'm currently using the count API, but
I suspect even that is doing more work than I actually need.
I guess the count API is very efficient for this. Are you running into
performance problems and if you are, maybe you could give the us insights
in how your data is structured?
Whether there could be an even more efficient in Elasticsearch internally,
I don't doubt that, I only think that this feature will not be high on the
roadmap.
Do you issue the same query a lot? Or are the query's different? Can you
possibly use filters to be able to use caches?
Jaap
On Tuesday, June 11, 2013 3:40:38 AM UTC+2, Matt Weber wrote:
I don't think there is anything like this for queries. You can do a HEAD
request for a specific document, but not for searches. I would do the
query with a size of 0 using the query and fetch search type for the
fastest execution.
On Mon, Jun 10, 2013 at 5:44 PM, Allan Johns <nerd...@gmail.com<javascript:>
wrote:
I have a case where I need to find out if any documents match a given
query, but I don't need the result set, or even a count of the result.
What is the most efficient way to do this, and is there room for a new
feature in ES tailored to this case? I'm currently using the count API, but
I suspect even that is doing more work than I actually need.
Thanks,
A
--
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:>.
For more options, visit https://groups.google.com/groups/opt_out.
I'm not running into performance problems - yet - I just have a special
case where I don't need the result set at all. Also, the query in question
varies too much, I don't think I can get much benefit from caching.
thx
A
On Wed, Jun 12, 2013 at 6:43 AM, Jaap Taal jaap@q42.nl wrote:
I guess the count API is very efficient for this. Are you running into
performance problems and if you are, maybe you could give the us insights
in how your data is structured?
Whether there could be an even more efficient in Elasticsearch internally,
I don't doubt that, I only think that this feature will not be high on the
roadmap.
Do you issue the same query a lot? Or are the query's different? Can you
possibly use filters to be able to use caches?
Jaap
On Tuesday, June 11, 2013 3:40:38 AM UTC+2, Matt Weber wrote:
I don't think there is anything like this for queries. You can do a HEAD
request for a specific document, but not for searches. I would do the
query with a size of 0 using the query and fetch search type for the
fastest execution.
On Mon, Jun 10, 2013 at 5:44 PM, Allan Johns nerd...@gmail.com wrote:
I have a case where I need to find out if any documents match a given
query, but I don't need the result set, or even a count of the result.
What is the most efficient way to do this, and is there room for a new
feature in ES tailored to this case? I'm currently using the count API, but
I suspect even that is doing more work than I actually need.
Thanks,
A
--
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.
I would just use a count query. The heavy lifting of querying the index is
done already. Condensing the returned result set to true or false will
hardly save you anything over executing a count query.
I'm not running into performance problems - yet - I just have a special
case where I don't need the result set at all. Also, the query in question
varies too much, I don't think I can get much benefit from caching.
thx
A
On Wed, Jun 12, 2013 at 6:43 AM, Jaap Taal jaap@q42.nl wrote:
I guess the count API is very efficient for this. Are you running into
performance problems and if you are, maybe you could give the us insights
in how your data is structured?
Whether there could be an even more efficient in Elasticsearch
internally, I don't doubt that, I only think that this feature will not be
high on the roadmap.
Do you issue the same query a lot? Or are the query's different? Can you
possibly use filters to be able to use caches?
Jaap
On Tuesday, June 11, 2013 3:40:38 AM UTC+2, Matt Weber wrote:
I don't think there is anything like this for queries. You can do a
HEAD request for a specific document, but not for searches. I would do the
query with a size of 0 using the query and fetch search type for the
fastest execution.
On Mon, Jun 10, 2013 at 5:44 PM, Allan Johns nerd...@gmail.com wrote:
I have a case where I need to find out if any documents match a given
query, but I don't need the result set, or even a count of the result.
What is the most efficient way to do this, and is there room for a new
feature in ES tailored to this case? I'm currently using the count API, but
I suspect even that is doing more work than I actually need.
Thanks,
A
--
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.
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.