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

setMinWordLength() public méthode

Set min word length.
public setMinWordLength ( integer $minWordLength )
$minWordLength integer
    public function setMinWordLength($minWordLength)
    {
        return $this->setParam('min_word_length', (int) $minWordLength);
    }

Usage Example

 /**
  * @group unit
  */
 public function testSetMinWordLength()
 {
     $query = new MoreLikeThis();
     $length = 4;
     $query->setMinWordLength($length);
     $this->assertEquals($length, $query->getParam('min_word_length'));
 }