예제 #1
0
 /**
  * Process bool query
  *
  * @param ScoreBuilder $scoreBuilder
  * @param BoolQuery $query
  * @param Select $select
  * @param QueryContainer $queryContainer
  * @return Select
  */
 private function processBoolQuery(ScoreBuilder $scoreBuilder, BoolQuery $query, Select $select, QueryContainer $queryContainer)
 {
     $scoreBuilder->startQuery();
     $select = $this->processBoolQueryCondition($scoreBuilder, $query->getMust(), $select, BoolQuery::QUERY_CONDITION_MUST, $queryContainer);
     $select = $this->processBoolQueryCondition($scoreBuilder, $query->getShould(), $select, BoolQuery::QUERY_CONDITION_SHOULD, $queryContainer);
     $select = $this->processBoolQueryCondition($scoreBuilder, $query->getMustNot(), $select, BoolQuery::QUERY_CONDITION_NOT, $queryContainer);
     $scoreBuilder->endQuery($query->getBoost());
     return $select;
 }
예제 #2
0
 protected function processBoolQuery(BoolQuery $query, DataObject $params, $conditionType)
 {
     $this->processBoolQueryCondition($query->getMust(), $params, BoolQuery::QUERY_CONDITION_MUST);
     $this->processBoolQueryCondition($query->getShould(), $params, BoolQuery::QUERY_CONDITION_SHOULD);
     $this->processBoolQueryCondition($query->getMustNot(), $params, BoolQuery::QUERY_CONDITION_NOT);
 }
예제 #3
0
 /**
  * @param BoolQuery      $query
  * @param SphinxQL       $select
  * @param QueryContainer $queryContainer
  * @return SphinxQL
  */
 private function processBoolQuery(BoolQuery $query, SphinxQL $select, QueryContainer $queryContainer)
 {
     $select = $this->processBoolQueryCondition($query->getMust(), $select, BoolQuery::QUERY_CONDITION_MUST, $queryContainer);
     $select = $this->processBoolQueryCondition($query->getShould(), $select, BoolQuery::QUERY_CONDITION_SHOULD, $queryContainer);
     $select = $this->processBoolQueryCondition($query->getMustNot(), $select, BoolQuery::QUERY_CONDITION_NOT, $queryContainer);
     return $select;
 }