protected function SearchApiSolrBackend::alterSearchApiQuery in Search API Solr 8.2
Same name and namespace in other branches
- 8 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::alterSearchApiQuery()
Allow custom changes before converting a SearchAPI query into a Solr query.
This is an object oriented equivalent to hook_search_api_query_alter() to avoid that any logic needs to be split between the backend class and a module file.
Parameters
\Drupal\search_api\Query\QueryInterface $query: The \Drupal\search_api\Query\Query object.
See also
3 calls to SearchApiSolrBackend::alterSearchApiQuery()
- AbstractSearchApiSolrMultilingualBackend::alterSearchApiQuery in src/
Plugin/ search_api/ backend/ AbstractSearchApiSolrMultilingualBackend.php - Adjusts the language filter before converting the query into a Solr query.
- SearchApiSolrBackend::getAutocompleteSuggestions in src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php - Implements autocomplete compatible to AutocompleteBackendInterface.
- SearchApiSolrBackend::search in src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php - Options on $query prefixed by 'solr_param_' will be passed natively to Solr as query parameter without the prefix. For example you can set the "Minimum Should Match" parameter 'mm' to '75%' like this:
1 method overrides SearchApiSolrBackend::alterSearchApiQuery()
- AbstractSearchApiSolrMultilingualBackend::alterSearchApiQuery in src/
Plugin/ search_api/ backend/ AbstractSearchApiSolrMultilingualBackend.php - Adjusts the language filter before converting the query into a Solr query.
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php, line 2416
Class
- SearchApiSolrBackend
- Apache Solr backend for search api.
Namespace
Drupal\search_api_solr\Plugin\search_api\backendCode
protected function alterSearchApiQuery(QueryInterface $query) {
}