1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30:
<?php
namespace Manticoresearch\Query;
use Manticoresearch\Query;
class BoolQuery extends Query
{
public function must($args):self
{
$this->_params['must'][]= $args;
return $this;
}
public function mustNot($args):self
{
$this->_params['must_not'][]= $args;
return $this;
}
public function should($args):self
{
$this->_params['should'][]= $args;
return $this;
}
public function toArray()
{
return parent::_toArray(['bool'=>$this->_params]);
}
}