0
如何在elastica库中应用弹性搜索过滤器。弹性过滤器的工作
需要一个术语过滤器的例子。
$query1 = new \Elastica\Filter\Term();
$query1->setTerm('categories', array('short_description' =>'test metal'));
$bool->addShould($query);
或
$query1 = new \Elastica\Filter\Term();
$query1->setTerm('categories', 'test metal');
我尝试使用上面这导致以下错误
无效参数的方法。必须是数组或实例 Elastica \ Query \ AbstractQuery
这是使用弹性搜索的过滤器。我如何使用elastica库过滤器。 – Sattu