在PHP Drupal中,我希望发出一个在字段“ field_xxx”中查找并带有几个标识的请求:id = 106 AND id = 105(如过滤器)。
我尝试了各种解决方案均未成功。
有人可以帮我吗?非常感谢你
$searchParams = [
'index' => 'indextest,
'type' => 'index_test',
'body' => [
'query' => [
'bool' => [
'must' => [
[ 'match' => [ 'title' => 'the cat' ] ],
[ 'match' => [ 'field_xxx' => ['106','105'] ] ],
]
]
]
]
];
$searchParams['body']['query']['match']['title'] = "Le jeu de la dame";
$searchParams['body']['query']['bool']['must']['field_support']= '106,105';
我认为terms
查询将是有用的。
看看这个
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句