protected function SearchApiElasticsearchConnector::getItemFromElasticsearch in Elasticsearch Connector 7.2
Same name and namespace in other branches
- 7.5 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getItemFromElasticsearch()
- 7 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getItemFromElasticsearch()
1 call to SearchApiElasticsearchConnector::getItemFromElasticsearch()
- SearchApiElasticsearchConnector::handleMLTSearch in modules/
elasticsearch_connector_search_api/ service.inc - Handle the "More like this" functionality if it is required.
File
- modules/
elasticsearch_connector_search_api/ service.inc, line 1168 - Provides a Elasticsearch-based service class for the Search API using Elasticsearch Connector module.
Class
- SearchApiElasticsearchConnector
- Search service class.
Code
protected function getItemFromElasticsearch(SearchApiIndex $index, $id) {
$params = $this
->getIndexParam($index, TRUE);
$params['id'] = $id;
try {
$response = $this->elasticsearchClient
->get($params);
return $response;
} catch (Exception $e) {
watchdog('Elasticsearch Search API', check_plain($e
->getMessage()), array(), WATCHDOG_ERROR);
}
}