Elastica\Query\MoreLikeThis::setMaxDocFrequency PHP Méthode

setMaxDocFrequency() public méthode

set max document frequency.
public setMaxDocFrequency ( integer $maxDocFreq )
$maxDocFreq integer
    public function setMaxDocFrequency($maxDocFreq)
    {
        return $this->setParam('max_doc_freq', (int) $maxDocFreq);
    }

Usage Example

 /**
  * @group unit
  */
 public function testSetMaxDocFrequency()
 {
     $query = new MoreLikeThis();
     $freq = 2;
     $query->setMaxDocFrequency($freq);
     $this->assertEquals($freq, $query->getParam('max_doc_freq'));
 }