Ignoring the differences in the query itself (e.g. they query different
things), I believe the performance difference is more related to your
filter choice. In the top query, you are using a "Query Filter", which
just wraps a query with a filter so you can cache the returned results.
This can be useful if you hit the same query over and over, where it makes
sense to just save the output instead of processing the request. However,
you don't gain any filter search-time performance. You are effectively
running a really big query string against all the docs.
The lower query uses a "Filtered Query", which first takes your corpus of
documents and discards those that don't match the filter. Whatever
leftover is then searched with your query. This is very fast because the
filters are cached in memory, so you quickly reduce the size of documents
that need to be analyzed with your query.
Perhaps I'm misunderstanding your question. Curious to see what Clint says.
On Wednesday, January 30, 2013 4:42:15 PM UTC-5, john wrote:
Clint, Sorry for replying so late. Had gone on a vacation.
This is what i mean by elastic search query string:
AND X.marketplace:false AND X.active:true AND X.Z:false AND
X.startDate:[1910-01-01 TO 2013-01-29] AND X.end:true AND (((X.name:floor*
OR X.manufacturer:floor* OR X.desc:floor* OR X.desc:floor* OR
X.futures.feature:floor* OR X.details.value:floor*)))"}}}}
And this is what i mean by Lucene queries. And the queries created oin the
manner below are a lot faster than i i were to create a query string for
the same conditions.
On Tuesday, 22 January 2013 12:23:24 UTC-6, Clinton Gormley wrote:
On Tue, 2013-01-22 at 10:13 -0800, john wrote:
By lucene query format i mean using the java API for elastic search.
The API allows to build query as a combination of queries and filters,
the way you mentioned below.
Before that i was query strings.
It'd be a lot easier to figure out what you were comparing if you
provided the code
On Tuesday, January 22, 2013 10:17:54 AM UTC-6, Matt Weber wrote:
Didn't get to finish that:
On Tue, Jan 22, 2013 at 8:16 AM, Matt Weber
What do you mean by "lucene-query" format? The
ElasticSearch Query String Query accepts lucene query
syntax, ie. "this AND that OR whatever". Were you
talking about using that format vs. crafting the
underlying query objects
On Tue, Jan 22, 2013 at 8:13 AM, john
I tried running Elastic search queries, in the
Lucene-query format and also in the query
I found that the lucene queries were
considerably faster than the query-string
queries, approx. 4 times faster. Can some one
pls throw light on why is it so
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 email@example.com.
For more options, visit https://groups.google.com/groups/opt_out.