Mixing different queries (term, nested, query_string) to query the index


(Ramdev Wudali) #1

Hi:
I have a document that is mapped with certain fields being nested
fields. I have use cases where I get a request which when translated
becomes
a mix of nested and query_string queries. (or nested, term and query_string
queries).

Is there a way to mix the queries ?

I am aware that a term query or a query_string can have a filter which is a
nested query or vice-versa. This begs the question :

Conceptually , Is a a query like so : Term:value AND query_string
the same as executing a Term:value query with a filter of query_string ?

Similarly for nested queries ?

Thanks for any assistance regarding this

Ramdev

--
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.


(sina.tamanna) #2

One way to mix queries is to use bool queryhttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
.

On Friday, November 1, 2013 7:45:31 PM UTC+1, Ramdev Wudali wrote:

Hi:
I have a document that is mapped with certain fields being nested
fields. I have use cases where I get a request which when translated
becomes
a mix of nested and query_string queries. (or nested, term and
query_string queries).

Is there a way to mix the queries ?

I am aware that a term query or a query_string can have a filter which is
a nested query or vice-versa. This begs the question :

Conceptually , Is a a query like so : Term:value AND query_string
the same as executing a Term:value query with a filter of query_string ?

Similarly for nested queries ?

Thanks for any assistance regarding this

Ramdev

--
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.


(system) #3