In another forum, I was given the option of Search templates. But I am 
dynamically building boolean "AND" and "OR" query based on name value pairs 
which are received as part of the request. In the case of same fields, the 
values we use "OR" and between different fields "AND". I have seen search 
template, but can we pass a query like this?

On Monday, April 27, 2015 at 9:20:44 PM UTC+5:30, Nithyanand wrote:
>
> I am using angularjs and elasticsearch.angular.js. I have build a dynamic 
> JSON query object based on user requests. Is there a way to in ES 
> javascript to pass it to the search api?
>
> In the below example, myJSONQUery is the JSON object. 
>
>     
> client.search({
>     index: 'myindex*',
>     body :{
>     filtered : {
>     myJSONQUery
>     }
>     }
>     }).then(function (response) {
>     console.info(JSON.stringify(response));
>     });
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4027e7df-197c-476d-b870-e7ff4a0818df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to