0
像
if ($type == 'doc' && $statut == 'inactive')
return false;
所以我用布爾像
$filter ['bool'] ['should'] ['bool'] ['must_not'][] = array (
'term' => array (
'type' => "doc"
),
'term' => array (
'statut' => "inactive"
)
);
排除結果誰擁有內的兩個值,但不工作,你可以幫助我
編輯:在清除我想排除結果有類型=='doc'AND stat UT ==「無效」
嗨,你的標題是真的不清楚,什麼是「不能,如果和」是什麼意思?您使用當前代碼看到的結果是什麼? –
編輯是否更清楚? –
是的!不過,很抱歉我沒有登錄很長時間。很高興你能找到你自己的答案,而且你把它提供給其他人! –