public function testDiacriticSensitiveFalseRemovesOption() { $expr = new Expr(); $expr->text('foo'); $expr->diacriticSensitive(true); $expr->diacriticSensitive(false); $this->assertEquals(array('$text' => array('$search' => 'foo')), $expr->getQuery()); }
/** * Negates an expression for the current field. * * @see Builder::not() * @see http://docs.mongodb.org/manual/reference/operator/not/ * @param array|Expr $expression * @return $this */ public function not($expression) { return $this->operator('$not', $expression instanceof Expr ? $expression->getQuery() : $expression); }
/** * Return the expression's query criteria. * * @see Expr::getQuery() * @return array */ public function getQueryArray() { return $this->expr->getQuery(); }
/** * {@inheritdoc} */ public function getExpression() { return ['$match' => $this->query->getQuery()]; }
/** * {@inheritdoc} */ public function getExpression() { return array('$match' => $this->query->getQuery()); }
private function buildGetEntityIdForTermQuery(Term $term) { $expr = new Expr(); $expr->field('sterms.' . $term->getLanguageCode())->equals($this->documentBuilder->cleanTextForSearch($term->getText())); return $expr->getQuery(); }