public function buildSearchQuery($rawQuery, $resultsPerPage = 10, array $additionalFiltersFromRequest = []) : SearchQuery
    {
        if ($this->typoScriptConfiguration->getLoggingQuerySearchWords()) {
            $this->logger->log(SolrLogManager::INFO, 'Received search query', [$rawQuery]);
        }

        /* @var $query SearchQuery */
        return $this->newSearchQuery($rawQuery)
                ->useResultsPerPage($resultsPerPage)
                ->useReturnFieldsFromTypoScript()
                ->useQueryFieldsFromTypoScript()
                ->useInitialQueryFromTypoScript()
                ->useFiltersFromTypoScript()
                ->useFilterArray($additionalFiltersFromRequest)
                ->useFacetingFromTypoScript()
                ->useVariantsFromTypoScript()
                ->useGroupingFromTypoScript()
                ->useHighlightingFromTypoScript()
                ->usePhraseFieldsFromTypoScript()
                ->useBigramPhraseFieldsFromTypoScript()
                ->useTrigramPhraseFieldsFromTypoScript()
                ->useOmitHeader(false)
                ->getQuery();
    }
public function buildSearchQuery($rawQuery, $resultsPerPage = 10, array $additionalFiltersFromRequest = []) : SearchQuery
    {
        if ($this->typoScriptConfiguration->getLoggingQuerySearchWords()) {
            $this->logger->log(SolrLogManager::INFO, 'Received search query', [$rawQuery]);
        }

        /* @var $query SearchQuery */
        return $this->newSearchQuery($rawQuery)
                ->useResultsPerPage($resultsPerPage)
                ->useReturnFieldsFromTypoScript()
                ->useQueryFieldsFromTypoScript()
                ->useInitialQueryFromTypoScript()
                ->useFiltersFromTypoScript()
                ->useFilterArray($additionalFiltersFromRequest)
                ->useFacetingFromTypoScript()
                ->useVariantsFromTypoScript()
                ->useGroupingFromTypoScript()
                ->useHighlightingFromTypoScript()
                ->usePhraseFieldsFromTypoScript()
                ->useBigramPhraseFieldsFromTypoScript()
                ->useTrigramPhraseFieldsFromTypoScript()
                ->useOmitHeader(false)
                ->getQuery();
    }
public function buildSearchQuery ( $ rawQuery , $ resultsPerPage = 10 , array $ additionalFiltersFromRequest = [ ] ) : SearchQuery { if ( $ this -> typoScriptConfiguration -> getLoggingQuerySearchWords ( ) ) { $ this -> logger -> log ( SolrLogManager :: INFO , 'Received search query' , [ $ rawQuery ] ) ; } /* @var $query SearchQuery */ return $ this -> newSearchQuery ( $ rawQuery ) -> useResultsPerPage ( $ resultsPerPage ) -> useReturnFieldsFromTypoScript ( ) -> useQueryFieldsFromTypoScript ( ) -> useInitialQueryFromTypoScript ( ) -> useFiltersFromTypoScript ( ) -> useFilterArray ( $ additionalFiltersFromRequest ) -> useFacetingFromTypoScript ( ) -> useVariantsFromTypoScript ( ) -> useGroupingFromTypoScript ( ) -> useHighlightingFromTypoScript ( ) -> usePhraseFieldsFromTypoScript ( ) -> useBigramPhraseFieldsFromTypoScript ( ) -> useTrigramPhraseFieldsFromTypoScript ( ) -> useOmitHeader ( false ) -> getQuery ( ) ; }
Initializes the Query object and SearchComponents and returns
the initialized query object, when a search should be executed.

@param string|null $rawQuery
@param int $resultsPerPage
@param array $additionalFiltersFromRequest
@return SearchQuery
Initializes the Query object and SearchComponents and returns the initialized query object when a search should be executed .