Nested or/and in filters

Hi,

is it possible to filter like this... a=1 AND b=1 AND ( d=NULL OR (e=3 AND d=1) ) ?
I've came to or/and filters but don't know how to nest them.

hope anyone can help

actually I only need a='something' AND ( date=NULL OR date>now )

anyone?

Le 21 mai 2011 à 14:29, xrado a écrit :

actually I only need a='something' AND ( date=NULL OR date>now )

I am more used to use the Java lucene API, but since the elasticsearch DSL nicely match to the Lucene API, I think I can answer with this:

{
"bool" : {
"must" : [
{
"term" : { "a" : "something" }
},
{
"bool" : {
"should" : [
{
"term" : { "date" : "NULL" }
},
{
"range" : {
"date" : { "from" : "now" }
}
}
]
}
}
]
}
}

Nicolas

thx man! this is it