我使用elasticsearch获取一些文档,我必须像
一样$creator = array("admin","visitor","user");
$subject = array("weather","world","sport");
并且在我的搜索中我想得到所有结果每个数组都有一个值
所以我用这个
$myfilter ['bool'] ['must'] [] = array (
'term' => array (
'tag_creator' => $creator
)
);
$myfilter ['bool'] ['must'] [] = array (
'term' => array (
'tag_subject' => $subject
)
);
但是这不起作用我得到的结果只是每个数组的最后一个值(“用户”和“运动”)