setMinimumShouldMatch() public method

Set field minimum should match for Match Query.
public setMinimumShouldMatch ( mixed $minimumShouldMatch )
$minimumShouldMatch mixed
コード例 #1
0
ファイル: MultiMatchTest.php プロジェクト: bungkoko/Elastica
 /**
  * @group functional
  */
 public function testMinimumShouldMatch()
 {
     $multiMatch = new MultiMatch();
     $multiMatch->setQuery('Tristan Maindron');
     $multiMatch->setFields(array('full_name', 'name'));
     $multiMatch->setMinimumShouldMatch('2<100%');
     $resultSet = $this->_getResults($multiMatch);
     $this->assertEquals(1, $resultSet->count());
 }