【发布时间】:2016-06-23 11:11:45
【问题描述】:
大家好,我现在正在用这个东西敲我的头。我正在尝试将其转换为弹性搜索查询,例如
$boolQuery = new \Elastica\Query\BoolQuery();
$fieldQuery = new \Elastica\Query\Match();
$fieldQuery->setFieldQuery('title', 'searchTern');
$boolQuery->addShould($fieldQuery);
.. 但到目前为止,我的努力是徒劳的
这是我的 Doctrine ORM 查询:
return $this->createQueryBuilder('article')
->addSelect('aTrans')
->join('article.translations', 'aTrans')
->join('NameSpace\Entity\Article', 'front',
'WITH', 'front.article = article')
->andWhere('aTrans.locale = :locale')
->setParameter("locale", $locale)
->andWhere('article.isActive = true')
->orderBy('article.createdAt', 'DESC')
->setMaxResults($limit)
【问题讨论】:
标签: elasticsearch doctrine-orm foselasticabundle