Elastica\Query\Common::setLowFrequencyOperator PHP Метод

setLowFrequencyOperator() публичный Метод

Set the logic operator for low frequency terms.
public setLowFrequencyOperator ( string $operator )
$operator string see OPERATOR_* class constants for options
    public function setLowFrequencyOperator($operator)
    {
        return $this->setQueryParam('low_freq_operator', $operator);
    }

Usage Example

Пример #1
0
 /**
  * @group unit
  */
 public function testToArray()
 {
     $query = new Common('body', 'test query', 0.001);
     $query->setLowFrequencyOperator(Common::OPERATOR_AND);
     $expected = array('common' => array('body' => array('query' => 'test query', 'cutoff_frequency' => 0.001, 'low_freq_operator' => 'and')));
     $this->assertEquals($expected, $query->toArray());
 }