You are here

class Query in Search API Solr 8.3

Same name and namespace in other branches
  1. 8 src/Solarium/Autocomplete/Query.php \Drupal\search_api_solr\Solarium\Autocomplete\Query
  2. 8.2 src/Solarium/Autocomplete/Query.php \Drupal\search_api_solr\Solarium\Autocomplete\Query
  3. 4.x src/Solarium/Autocomplete/Query.php \Drupal\search_api_solr\Solarium\Autocomplete\Query

Autocomplete query.

Hierarchy

  • class \Drupal\search_api_solr\Solarium\Autocomplete\Query extends \Solarium\Core\Query\AbstractQuery implements \Solarium\Component\ComponentAwareQueryInterface uses \Solarium\Component\QueryTraits\SpellcheckTrait, \Solarium\Component\QueryTraits\SuggesterTrait, \Solarium\Component\QueryTraits\TermsTrait, \Solarium\Component\ComponentAwareQueryTrait

Expanded class hierarchy of Query

2 files declare their use of Query
SearchApiSolrBackend.php in src/Plugin/search_api/backend/SearchApiSolrBackend.php
SolrConnectorPluginBase.php in src/SolrConnector/SolrConnectorPluginBase.php
1 string reference to 'Query'
search_api_solr.solr_request_handler.request_handler_query_default_7_0_0.yml in config/install/search_api_solr.solr_request_handler.request_handler_query_default_7_0_0.yml
config/install/search_api_solr.solr_request_handler.request_handler_query_default_7_0_0.yml

File

src/Solarium/Autocomplete/Query.php, line 20

Namespace

Drupal\search_api_solr\Solarium\Autocomplete
View source
class Query extends AbstractQuery implements ComponentAwareQueryInterface {
  use ComponentAwareQueryTrait;
  use SpellcheckTrait;
  use SuggesterTrait;
  use TermsTrait;

  /**
   * Default options.
   *
   * @var array
   */
  protected $options = [
    'handler' => 'autocomplete',
    'resultclass' => Result::class,
  ];

  /**
   * Constructs a Query object.
   */
  public function __construct($options = NULL) {
    $this->componentTypes = [
      ComponentAwareQueryInterface::COMPONENT_SPELLCHECK => Spellcheck::class,
      ComponentAwareQueryInterface::COMPONENT_SUGGESTER => Suggester::class,
      ComponentAwareQueryInterface::COMPONENT_TERMS => Terms::class,
    ];
    parent::__construct($options);
  }

  /**
   * {@inheritdoc}
   */
  public function getType() : string {
    return 'autocomplete';
  }

  /**
   * {@inheritdoc}
   */
  public function getRequestBuilder() : RequestBuilderInterface {
    return new RequestBuilder();
  }

  /**
   * {@inheritdoc}
   */
  public function getResponseParser() : ResponseParserInterface {
    return new ResponseParser();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Query::$options protected property Default options.
Query::getRequestBuilder public function
Query::getResponseParser public function
Query::getType public function
Query::__construct public function Constructs a Query object.