Facet Filter Confusion

Hey,

forgot to post the solution here. First, the provided information was not
sufficient, sorry.
We had a combined "and" filter which was causing the slow response.
(A simple term filter is still 2 times faster then the query_string
equivalent)

But the thing with the "and" filter was still strange. And we fixed it. We
just replaced the "and" with a "bool" filter (must). Now 3 times faster!

Why are they so different?

Regards,
Peter.

On Thursday, January 10, 2013 6:21:13 PM UTC+1, Karussell wrote:

Hi,

I just want to apply a filter to the query AND to the facets. When I do:

{"query":{"query_string":{"query":"userinput someField:someValue"}}

  • several facets!
    }

this works and is fast!

But I hoped to make it even faster when doing a filtered query which could
be better cached (!?). So I tried:

{"query":{
"filtered": {
"query":{"query_string": {"query":"userinput"}},
"filter":{ "term":{"someField":"someValue"}}
}}

  • several facets!
    }

which is at least 10 times slower on my machine** for my index.
Is it because the filtered part will be called after the facets have been
executed?
bigdesk shows enough free RAM

I think I could probably put the filter into every facet via facet_filter
to make it cached and fast,
but is it really that complicated?

Regards,
Peter.

** using jdk1.6.0_26 on ubuntu with elasticsearch 0.19.8

--
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.
For more options, visit https://groups.google.com/groups/opt_out.