You are here

public function SolrConnectorPluginBase::getAutocompleteQuery in Search API Solr 8.3

Same name and namespace in other branches
  1. 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getAutocompleteQuery()
  2. 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getAutocompleteQuery()
  3. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getAutocompleteQuery()

Creates a new Solarium autocomplete query.

Return value

\Drupal\search_api_solr\Solarium\Autocomplete\Query The Autocomplete query.

Overrides SolrConnectorInterface::getAutocompleteQuery

1 call to SolrConnectorPluginBase::getAutocompleteQuery()
StandardSolrCloudConnector::getAutocompleteQuery in src/Plugin/SolrConnector/StandardSolrCloudConnector.php
Creates a new Solarium autocomplete query.
1 method overrides SolrConnectorPluginBase::getAutocompleteQuery()
StandardSolrCloudConnector::getAutocompleteQuery in src/Plugin/SolrConnector/StandardSolrCloudConnector.php
Creates a new Solarium autocomplete query.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 740

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function getAutocompleteQuery() {
  $this
    ->connect();
  $this->solr
    ->registerQueryType('autocomplete', AutocompleteQuery::class);
  return $this->solr
    ->createQuery('autocomplete');
}