/** * @param string $fieldName * @param array $queries * * @return \Elastica\Query\Nested */ protected function bindMultipleNestedQuery($fieldName, array $queries) { $boolQuery = $this->queryBuilder->createBoolQuery(); foreach ($queries as $query) { $boolQuery->addFilter($query); } $nestedQuery = $this->queryBuilder->createNestedQuery($fieldName)->setQuery($boolQuery); return $nestedQuery; }
/** * @param \Generated\Shared\Transfer\FacetConfigTransfer $facetConfigTransfer * @param string $filterValue * * @return \Elastica\Query\Term */ protected function createTermQuery(FacetConfigTransfer $facetConfigTransfer, $filterValue) { return $this->queryBuilder->createTermQuery($facetConfigTransfer->getFieldName(), $filterValue); }