/** * 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; }
/** * Process bool query * * @param ScoreBuilder $scoreBuilder * @param BoolQuery $query * @param Select $select * @return Select */ private function processBoolQuery(ScoreBuilder $scoreBuilder, BoolQuery $query, Select $select) { $scoreBuilder->startQuery(); $select = $this->processBoolQueryCondition($scoreBuilder, $query->getMust(), $select, self::BOOL_MUST); $select = $this->processBoolQueryCondition($scoreBuilder, $query->getShould(), $select, self::BOOL_MUST); $select = $this->processBoolQueryCondition($scoreBuilder, $query->getMustNot(), $select, self::BOOL_MUST_NOT); $scoreBuilder->endQuery($query->getBoost()); return $select; }