Author: Manuel Andreo Garcia (andreo.garcia@googlemail.com)
Inheritance: implements Elastica\QueryBuilder\DSL
示例#1
0
 /**
  * @group unit
  */
 public function testMatch()
 {
     $queryDSL = new DSL\Query();
     $match = $queryDSL->match('field', 'match');
     $this->assertEquals('match', $match->getParam('field'));
     $this->assertInstanceOf('Elastica\\Query\\Match', $match);
 }
示例#2
0
 /**
  * @group unit
  */
 public function testFilteredDeprecated()
 {
     $errorsCollector = $this->startCollectErrors();
     $queryDSL = new DSL\Query();
     $queryDSL->filtered(null, new Exists('term'));
     $this->finishCollectErrors();
     $errorsCollector->assertOnlyDeprecatedErrors(array('Use bool() instead. Filtered query is deprecated since ES 2.0.0-beta1 and this method will be removed in further Elastica releases.', 'Deprecated: Elastica\\Query\\Filtered passing AbstractFilter is deprecated. Pass AbstractQuery instead.', 'Deprecated: Elastica\\Query\\Filtered::setFilter passing AbstractFilter is deprecated. Pass AbstractQuery instead.'));
 }