PHP Класс Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Spellchecker

This implementation rely on the ES term vectors API.
Автор: Aurelien FOUCRET ([email protected])
Наследование: implements Smile\ElasticsuiteCore\Api\Search\SpellcheckerInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Smile\ElasticsuiteCore\Api\Client\ClientFactoryInterface $clientFactory, Cache $cacheHelper ) Constructor.
getSpellingType ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request ) {@inheritDoc}

Приватные методы

Метод Описание
extractTermStatsByPoisition ( array $termVectors ) : array Extract term stats by position from a term vectors query response.
getAnalyzer ( string $propertyName ) : string Extract analayser from a mapping property name.
getCacheKey ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request ) : string Compute an unique caching key for the spellcheck request.
getCutoffrequencyLimit ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request ) : integer Count document into the index and then multiply it by the request cutoff frequency to compute an absolute cutoff frequency limit (max numbre of doc).
getTermVectors ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request ) : array Run a term vectors query against the index and return the result.
loadSpellingType ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request ) : integer Compute the spelling time using the engine.
parseTermVectors ( array $termVectors, integer $cutoffFrequencyLimit ) : array Parse the terms vectors to extract stats on the query.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Smile\ElasticsuiteCore\Api\Client\ClientFactoryInterface $clientFactory, Cache $cacheHelper )
$clientFactory Smile\ElasticsuiteCore\Api\Client\ClientFactoryInterface ES Client Factory.
$cacheHelper Smile\ElasticsuiteCore\Helper\Cache ES cache helper.

getSpellingType() публичный Метод

{@inheritDoc}
public getSpellingType ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request )
$request Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface