private function getSpellingType(ContainerConfigurationInterface $containerConfig, $queryText)
    {
        if (is_array($queryText)) {
            $queryText = implode(" ", $queryText);
        }

        $spellcheckRequestParams = [
            'index'           => $containerConfig->getIndexName(),
            'type'            => $containerConfig->getTypeName(),
            'queryText'       => $queryText,
            'cutoffFrequency' => $containerConfig->getRelevanceConfig()->getCutOffFrequency(),
        ];

        $spellcheckRequest = $this->spellcheckRequestFactory->create($spellcheckRequestParams);
        $spellingType      = $this->spellchecker->getSpellingType($spellcheckRequest);

        return $spellingType;
    }
private function getSpellingType(ContainerConfigurationInterface $containerConfig, $queryText)
    {
        if (is_array($queryText)) {
            $queryText = implode(" ", $queryText);
        }

        $spellcheckRequestParams = [
            'index'           => $containerConfig->getIndexName(),
            'type'            => $containerConfig->getTypeName(),
            'queryText'       => $queryText,
            'cutoffFrequency' => $containerConfig->getRelevanceConfig()->getCutOffFrequency(),
        ];

        $spellcheckRequest = $this->spellcheckRequestFactory->create($spellcheckRequestParams);
        $spellingType      = $this->spellchecker->getSpellingType($spellcheckRequest);

        return $spellingType;
    }
private function getSpellingType ( ContainerConfigurationInterface $ containerConfig , $ queryText ) { if ( is_array ( $ queryText ) ) { $ queryText = implode ( " " , $ queryText ) ; } $ spellcheckRequestParams = [ 'index' => $ containerConfig -> getIndexName ( ) , 'type' => $ containerConfig -> getTypeName ( ) , 'queryText' => $ queryText , 'cutoffFrequency' => $ containerConfig -> getRelevanceConfig ( ) -> getCutOffFrequency ( ) , ] ; $ spellcheckRequest = $ this -> spellcheckRequestFactory -> create ( $ spellcheckRequestParams ) ; $ spellingType = $ this -> spellchecker -> getSpellingType ( $ spellcheckRequest ) ; return $ spellingType ; }
Retireve the spelling type for a fulltext query.

@param ContainerConfigurationInterface $containerConfig Search request configuration.
@param string|string[]                 $queryText       Query text.

@return int
Retireve the spelling type for a fulltext query .