Combining filters

Hello.
How can i use 'must' with nested 'should' and nested 'must '?
like Select * ...Where (domainId AND projectId AND (( data_range AND userid) OR ( data_range AND userid) )
{
"bool" : {
"must" : [
{
"term" : {
"domainId" : {
"value" : 7,
"boost" : 1.0
}
}
},
{
"bool" : {
"should" : [
{
"bool" : {
"must" : [
{
"range" : {
"date" : {
"from" : "2017-12-05",
"to" : "2017-12-05",
"include_lower" : true,
"include_upper" : true,
"format" : "yyyy-MM-dd",
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
{
"bool" : {
"should" : [
{
"bool" : {
"must" : [
{
"range" : {
"date" : {
"from" : "2017-12-06",
"to" : "2017-12-06",
"include_lower" : true,
"include_upper" : true,
"format" : "yyyy-MM-dd",
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.