Advertising sustains the DA. Ads are hidden for members. Join today

Elastica

Last updated on
30 April 2025

Search API Elasticsearch includes support for the Elastica client library.

Installation

There are multiple ways to install the Elastica client library. The Elastica submodule provides integration with Composer Manager.

The submodule offers a Drush command to install the client library. It will detect whether you are using Composer Manager or Libraries API and install the client library in the appropriate manner.

drush download-elastica

Please note that if you enable the submodule via Drush (drush en search_api_elasticsearch_elastica), the installation will proceed automatically if it is determined that the client library does not yet exist.

Transport Options

The Elastica client library supports multiple transport options.

  • HTTP/HTTPS via Curl - The default option to query Elasticsearch via the REST API.
  • Guzzle - Uses the Guzzle library to query Elasticsearch via the REST API. This may be slower than via Curl, but there also may be some advantages to using this option depending on your implementation and other needs.
  • Thrift - Uses Thrift transport to query Elasticsearch. This requires that the Thrift plugin be installed on the Elasticsearch server. Thrift uses less overhead than HTTP and therefore typically results in better performance. This is the recommended option for applications with a large amount of Elasticsearch traffic.
  • Memcached - Allows you to query Elasticsearch via Memcached protocol. This requires that the Memcached plugin be installed on the Elasticsearch server. The plugin exposes the REST API over Memcached, though there are limitations.

Help improve this page

Page status: Not set

You can: