private function applyFunctions(QueryInterface $query, $functions = [])
    {
        if (!empty($functions)) {
            $queryParams = [
                'query'     => $query,
                'functions' => $functions,
                'scoreMode' => FunctionScore::SCORE_MODE_MULTIPLY,
                'boostMode' => FunctionScore::BOOST_MODE_MULTIPLY,
            ];
            $query = $this->queryFactory->create(QueryInterface::TYPE_FUNCTIONSCORE, $queryParams);
        }

        return $query;
    }
private function applyFunctions(QueryInterface $query, $functions = [])
    {
        if (!empty($functions)) {
            $queryParams = [
                'query'     => $query,
                'functions' => $functions,
                'scoreMode' => FunctionScore::SCORE_MODE_MULTIPLY,
                'boostMode' => FunctionScore::BOOST_MODE_MULTIPLY,
            ];
            $query = $this->queryFactory->create(QueryInterface::TYPE_FUNCTIONSCORE, $queryParams);
        }

        return $query;
    }
private function applyFunctions ( QueryInterface $ query , $ functions = [ ] ) { if ( ! empty ( $ functions ) ) { $ queryParams = [ 'query' => $ query , 'functions' => $ functions , 'scoreMode' => FunctionScore :: SCORE_MODE_MULTIPLY , 'boostMode' => FunctionScore :: BOOST_MODE_MULTIPLY , ] ; $ query = $ this -> queryFactory -> create ( QueryInterface :: TYPE_FUNCTIONSCORE , $ queryParams ) ; } return $ query ; }
Apply boost functions to a given query.

@param \Smile\ElasticsuiteCore\Search\Request\QueryInterface $query     The Query
@param array                                                 $functions The boost functions

@return \Smile\ElasticsuiteCore\Search\Request\QueryInterface
Apply boost functions to a given query .