I have a 180 million records index, the only queries that I need to do
online are counting queries, over ranges and terms, there are no
analyzed fields.
What is the most efficient query I can use, I have a machine with 16G, and
the load is very small but when a request hits it must go as fast as
possible
I have a 180 million records index, the only queries that I need to do
online are counting queries, over ranges and terms, there are no
analyzed fields.
What is the most efficient query I can use, I have a machine with 16G, and
the load is very small but when a request hits it must go as fast as
possible
I have a 180 million records index, the only queries that I need to do online are counting queries, over ranges and terms, there are no analyzed fields.
What is the most efficient query I can use, I have a machine with 16G, and the load is very small but when a request hits it must go as fast as possible
Ah, OK. I'd use a filter directly, without wrapping it in a constant_score
query. Also, since you have only "must" clauses in your filter, you might
want to try the AND
filterhttp://www.elasticsearch.org/guide/reference/query-dsl/and-filter/.
Not sure if it's any faster than the bool filter, though.
I have a 180 million records index, the only queries that I need to do
online are counting queries, over ranges and terms, there are no
analyzed fields.
What is the most efficient query I can use, I have a machine with 16G,
and the load is very small but when a request hits it must go as fast as
possible
Radu - re the and filter: it won't be better than bool in this case. It's
good for combining non-bitset filters (eg geo filters) but the bool filter
is better for combing bitset filters, like all of the filters listed in the
OP.
David: Currently you're using a "top-level" filter, ie the query executes,
and only then is the filter applied. I'd rewrite the query to use a
"filtered" query:
Ah, OK. I'd use a filter directly, without wrapping it in a constant_score
query. Also, since you have only "must" clauses in your filter, you might
want to try the AND filterhttp://www.elasticsearch.org/guide/reference/query-dsl/and-filter/.
Not sure if it's any faster than the bool filter, though.
I have a 180 million records index, the only queries that I need to do
online are counting queries, over ranges and terms, there are no
analyzed fields.
What is the most efficient query I can use, I have a machine with 16G,
and the load is very small but when a request hits it must go as fast as
possible
Can you elaborate on the difference or point me where I Can read more about
this issue
Should this query be much faster? and do I need more memory for such
queries? how are the bounded I/O or Memory
Radu - re the and filter: it won't be better than bool in this case.
It's good for combining non-bitset filters (eg geo filters) but the bool
filter is better for combing bitset filters, like all of the filters listed
in the OP.
David: Currently you're using a "top-level" filter, ie the query executes,
and only then is the filter applied. I'd rewrite the query to use a
"filtered" query:
Ah, OK. I'd use a filter directly, without wrapping it in a
constant_score query. Also, since you have only "must" clauses in your
filter, you might want to try the AND filterhttp://www.elasticsearch.org/guide/reference/query-dsl/and-filter/.
Not sure if it's any faster than the bool filter, though.
I have a 180 million records index, the only queries that I need to do
online are counting queries, over ranges and terms, there are no
analyzed fields.
What is the most efficient query I can use, I have a machine with 16G,
and the load is very small but when a request hits it must go as fast as
possible
Radu - re the and filter: it won't be better than bool in this case.
It's good for combining non-bitset filters (eg geo filters) but the bool
filter is better for combing bitset filters, like all of the filters listed
in the OP.
Radu - re the and filter: it won't be better than bool in this case.
It's good for combining non-bitset filters (eg geo filters) but the bool
filter is better for combing bitset filters, like all of the filters listed
in the OP.
Thanks, Clint! I didn't know that. And since I wanted to learn more, I
found this very helpful article (note also the references at the bottom):
Filtered queries are using the filter along side query execution (what you
want in most cases).
Top level filters (the "filter" field in your query) are executed after
query execution. This allows you to get back these filtered results in the
"hits" field, but also to have facets operating on the query without the
filter being applied. In practice you have a top level filter for field
'age' between 20 and 25, which means, your "hits" array will only include
these results, but if you are facetting on the age field in the same search
request, the facet calculation will be done without the filter being
applied.
Hope this helps. If not, just ask further question.
Radu - re the and filter: it won't be better than bool in this case.
It's good for combining non-bitset filters (eg geo filters) but the bool
filter is better for combing bitset filters, like all of the filters listed
in the OP.
Thanks, Clint! I didn't know that. And since I wanted to learn more, I
found this very helpful article (note also the references at the bottom):
So if my intention in to count the docs, I will get best performance from
the filtered query
I must say that my original query is very fast, how much boost are we
talking about, heuristically?
On Tue, May 14, 2013 at 10:27 AM, Alexander Reelsen alr@spinscale.dewrote:
Hey,
Filtered queries are using the filter along side query execution (what you
want in most cases).
Top level filters (the "filter" field in your query) are executed after
query execution. This allows you to get back these filtered results in the
"hits" field, but also to have facets operating on the query without the
filter being applied. In practice you have a top level filter for field
'age' between 20 and 25, which means, your "hits" array will only include
these results, but if you are facetting on the age field in the same search
request, the facet calculation will be done without the filter being
applied.
Hope this helps. If not, just ask further question.
Radu - re the and filter: it won't be better than bool in this case.
It's good for combining non-bitset filters (eg geo filters) but the bool
filter is better for combing bitset filters, like all of the filters listed
in the OP.
Thanks, Clint! I didn't know that. And since I wanted to learn more, I
found this very helpful article (note also the references at the bottom):
--
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.
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.