private function getFuzzyQuery(ContainerConfigurationInterface $containerConfig, $queryText)
    {
        $relevanceConfig    = $containerConfig->getRelevanceConfig();
        $phraseMatchBoost = $relevanceConfig->getPhraseMatchBoost();

        $defaultSearchField = MappingInterface::DEFAULT_SPELLING_FIELD;

        $standardAnalyzer = FieldInterface::ANALYZER_WHITESPACE;
        $phraseAnalyzer   = FieldInterface::ANALYZER_WHITESPACE;
        if (is_string($queryText) && str_word_count($queryText) > 1) {
            $phraseAnalyzer = FieldInterface::ANALYZER_SHINGLE;
        }

        $fuzzyFieldFilter = $this->fieldFilters['fuzzyFieldFilter'];

        $searchFields = array_merge(
            $this->getWeightedFields($containerConfig, $standardAnalyzer, $fuzzyFieldFilter, $defaultSearchField),
            $this->getWeightedFields($containerConfig, $phraseAnalyzer, $fuzzyFieldFilter, $defaultSearchField, $phraseMatchBoost)
        );

        $queryParams = [
            'fields'             => $searchFields,
            'queryText'          => $queryText,
            'minimumShouldMatch' => "100%",
            'tieBreaker'         => $relevanceConfig->getTieBreaker(),
            'fuzzinessConfig'    => $relevanceConfig->getFuzzinessConfiguration(),
            'cutoffFrequency'    => $relevanceConfig->getCutoffFrequency(),
        ];

        return $this->queryFactory->create(QueryInterface::TYPE_MULTIMATCH, $queryParams);
    }
private function getFuzzyQuery(ContainerConfigurationInterface $containerConfig, $queryText)
    {
        $relevanceConfig    = $containerConfig->getRelevanceConfig();
        $phraseMatchBoost = $relevanceConfig->getPhraseMatchBoost();

        $defaultSearchField = MappingInterface::DEFAULT_SPELLING_FIELD;

        $standardAnalyzer = FieldInterface::ANALYZER_WHITESPACE;
        $phraseAnalyzer   = FieldInterface::ANALYZER_WHITESPACE;
        if (is_string($queryText) && str_word_count($queryText) > 1) {
            $phraseAnalyzer = FieldInterface::ANALYZER_SHINGLE;
        }

        $fuzzyFieldFilter = $this->fieldFilters['fuzzyFieldFilter'];

        $searchFields = array_merge(
            $this->getWeightedFields($containerConfig, $standardAnalyzer, $fuzzyFieldFilter, $defaultSearchField),
            $this->getWeightedFields($containerConfig, $phraseAnalyzer, $fuzzyFieldFilter, $defaultSearchField, $phraseMatchBoost)
        );

        $queryParams = [
            'fields'             => $searchFields,
            'queryText'          => $queryText,
            'minimumShouldMatch' => "100%",
            'tieBreaker'         => $relevanceConfig->getTieBreaker(),
            'fuzzinessConfig'    => $relevanceConfig->getFuzzinessConfiguration(),
            'cutoffFrequency'    => $relevanceConfig->getCutoffFrequency(),
        ];

        return $this->queryFactory->create(QueryInterface::TYPE_MULTIMATCH, $queryParams);
    }
private function getFuzzyQuery ( ContainerConfigurationInterface $ containerConfig , $ queryText ) { $ relevanceConfig = $ containerConfig -> getRelevanceConfig ( ) ; $ phraseMatchBoost = $ relevanceConfig -> getPhraseMatchBoost ( ) ; $ defaultSearchField = MappingInterface :: DEFAULT_SPELLING_FIELD ; $ standardAnalyzer = FieldInterface :: ANALYZER_WHITESPACE ; $ phraseAnalyzer = FieldInterface :: ANALYZER_WHITESPACE ; if ( is_string ( $ queryText ) && str_word_count ( $ queryText ) > 1 ) { $ phraseAnalyzer = FieldInterface :: ANALYZER_SHINGLE ; } $ fuzzyFieldFilter = $ this -> fieldFilters [ 'fuzzyFieldFilter' ] ; $ searchFields = array_merge ( $ this -> getWeightedFields ( $ containerConfig , $ standardAnalyzer , $ fuzzyFieldFilter , $ defaultSearchField ) , $ this -> getWeightedFields ( $ containerConfig , $ phraseAnalyzer , $ fuzzyFieldFilter , $ defaultSearchField , $ phraseMatchBoost ) ) ; $ queryParams = [ 'fields' => $ searchFields , 'queryText' => $ queryText , 'minimumShouldMatch' => "100%" , 'tieBreaker' => $ relevanceConfig -> getTieBreaker ( ) , 'fuzzinessConfig' => $ relevanceConfig -> getFuzzinessConfiguration ( ) , 'cutoffFrequency' => $ relevanceConfig -> getCutoffFrequency ( ) , ] ; return $ this -> queryFactory -> create ( QueryInterface :: TYPE_MULTIMATCH , $ queryParams ) ; }
Fuzzy query part.

@param ContainerConfigurationInterface $containerConfig Search request container configuration.
@param string                          $queryText       The text query.

@return QueryInterface
Fuzzy query part .