Result.php in Search API Solr 8.2
File
src/Solarium/Autocomplete/Result.php
View source
<?php
namespace Drupal\search_api_solr\Solarium\Autocomplete;
use Solarium\Component\ComponentAwareQueryInterface;
use Solarium\Component\Result\Spellcheck\Result as SpellcheckResult;
use Solarium\Component\Result\Suggester\Result as SuggesterResult;
use Solarium\Component\Result\Terms\Result as TermsResult;
use Solarium\Core\Query\Result\QueryType as BaseResult;
class Result extends BaseResult {
protected $components;
public function getComponents() {
$this
->parseResponse();
return $this->components;
}
public function getComponent($key) {
$this
->parseResponse();
if (isset($this->components[$key])) {
return $this->components[$key];
}
return null;
}
public function getSpellcheck() {
return $this
->getComponent(ComponentAwareQueryInterface::COMPONENT_SPELLCHECK);
}
public function getSuggester() {
return $this
->getComponent(ComponentAwareQueryInterface::COMPONENT_SUGGESTER);
}
public function getTerms() {
return $this
->getComponent(ComponentAwareQueryInterface::COMPONENT_TERMS);
}
}
Classes
Name |
Description |
Result |
Autocomplete query result. |