Getting error when applying AND & OR filter

I've spent quite sometime to google for the solution. I want to apply AND &
OR filter together for my query but I'm getting error message returned

"* filter malformed, must start with start_object*"

My filter query as below:

filter: {
"and": [{"not":
{"terms":

{"article_id":["72A3F3E1-82AF-46E3-9DCC579ED6D36735"]}
}
},
{"terms":
{"page_type":["article"]}
},
{"or":

{"terms":{"document_types":["F04CA6D9-27CA-45FD-985371B7DD283452","5D95860A-6219-4ED0-A085DE269D562300"]}
}
}]
}

Can anyone help please?

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

Hello,

I think the problem is that your "or" filter expects an array of filters,
and not just one filter.

If I'm not guessing right, can you provide a curl
recreationhttp://www.elasticsearch.org/help/of the problem? I think
that will make things easier to diagnose.

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

On Thu, Aug 1, 2013 at 3:58 PM, Johnson Cheng johnson.cheng@pixl8.co.ukwrote:

I've spent quite sometime to google for the solution. I want to apply AND
& OR filter together for my query but I'm getting error message returned

"* filter malformed, must start with start_object*"

My filter query as below:

filter: {
"and": [{"not":
{"terms":

{"article_id":["72A3F3E1-82AF-46E3-9DCC579ED6D36735"]}
}
},
{"terms":
{"page_type":["article"]}
},
{"or":

{"terms":{"document_types":["F04CA6D9-27CA-45FD-985371B7DD283452","5D95860A-6219-4ED0-A085DE269D562300"]}
}
}]
}

Can anyone help please?

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

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