Registry / database / elasticsearch5

elasticsearch5

JSON →
library5.5.6pypypiunverified

The official Python client for Elasticsearch version 5.x. This library is in maintenance mode and should not be used with newer Elasticsearch versions. Current version is 5.5.6, with no active development. Users should upgrade to the elasticsearch library (7.x/8.x) for compatibility with modern Elasticsearch clusters.

pip install elasticsearch==5.5.6
INSTALL
IMPORT
SIG · ELASTICSEARCH5
E
elasticsearch5
databasepythonv5.5.6
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.5.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/2 runs
1/2 runs
py 3.11
1/2 runs
1/2 runs
py 3.12
1/2 runs
1/2 runs
py 3.13
1/2 runs
1/2 runs
py 3.9
1/2 runs
1/2 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Elasticsearch
from elasticsearch import Elasticsearch
from elasticsearch5 import Elasticsearch
The package name on PyPI is elasticsearch, not elasticsearch5. 'elasticsearch5' is only the wheel name for version 5.x.

Connect to a local Elasticsearch 5.x instance, index a document, and perform a basic search.

from elasticsearch import Elasticsearch # Connect to Elasticsearch (assuming default localhost:9200) es = Elasticsearch() # Index a document res = es.index(index="test-index", id=1, body={"name": "John Doe", "age": 30}) print(res['result']) # Search for documents res = es.search(index="test-index", body={"query": {"match": {"name": "John"}}}) print(res['hits']['hits'])
Debug
Known issues
breakingThis client is only compatible with Elasticsearch 5.x. Using it with Elasticsearch 6.x or later will cause serialization errors and unexpected behavior.
fix
Upgrade to the elasticsearch-py library version 6.x, 7.x, or 8.x matching your Elasticsearch version.
affects: all
breakingThe 'delete_by_query' and 'update_by_query' APIs now require the 'conflicts' parameter to be explicitly set. If not provided, the default behaviour differs from earlier versions.
fix
Always pass 'conflicts='proceed'' in delete/update_by_query calls to avoid unexpected failures.
affects: >=5.0.0
deprecatedSupport for Python 2.7 is deprecated in this version. Future versions (>=6.0) require Python 3.
fix
Migrate to Python 3 to use newer client versions.
affects: 5.5.x
gotchaThe 'timeout' parameter for connections is in seconds but default is long (10 seconds). Errors may appear as connection timeouts on slow networks. Unlike later versions, 5.x does not support 'max_retries' for connection failures.
fix
Set 'timeout' and 'max_retries' on the connection class manually, or upgrade to >=6.0.
affects: all 5.x
Upgrade
Version history
5.5.6latest on PyPI · released May 28, 2019
Audit
Dependencies
urllib3optionalRequired for HTTP connection pooling and SSL handling.
sixoptionalUsed for Python 2/3 compatibility.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
elasticsearch5 — pip install elasticsearch5 · libregistry