协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
elasticsearch-py【开发与工程】Guide the official Elasticsearch Python client for cluster connections, generated APIs, async code, bulk ingestion, query DSL, ES|QL, optional integrations, and runtime troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task uses the official elasticsearch Python package or
asks for Elasticsearch connections, indexing/search APIs, async client code,
bulk helpers, the high-level DSL, ES|QL, vector-store helpers, or client
troubleshooting. The source snapshot is package version 9.5.0; read
repo-provenance.md before deciding whether the
skill is stale for a different client checkout or version.
Q, Search, aggregations, mappings, Document, typed persistence, or
high-level query composition: read dsl-search.For a cross-cutting task, load client-operations first, then the workflow route; keep the client/auth configuration separate from request-body construction.
The package supports Python 3.10+. Install only the extras used by the task:
python -m pip install elasticsearch
python -m pip install "elasticsearch[async]" # aiohttp async transport
python -m pip install "elasticsearch[requests]" # requests transport
python -m pip install "elasticsearch[orjson]" # optional serializer
python -m pip install "elasticsearch[pyarrow]" # Arrow/ES|QL workflows
python -m pip install "elasticsearch[vectorstore_mmr]" # MMR helper support
from elasticsearch import AsyncElasticsearch, Elasticsearch
print(Elasticsearch, AsyncElasticsearch)
An import proves package availability only. client.info() is a live service
probe and requires a reachable endpoint, credentials, and correct TLS.
ca_certs or a supported fingerprint. Do not use
verify_certs=False as a production solution.elasticsearch/_sync/client/ or elasticsearch/_async/client/ to change an
API. Upstream API changes belong in the Elasticsearch specification project.client.close() for sync and await client.close() for async,
preferably with an async context manager.Use the bundled offline checks when no cluster is available:
python sub-skills/helpers-ingest/scripts/bulk_actions_smoke.pypython sub-skills/dsl-search/scripts/dsl_query_smoke.pypython sub-skills/esql-query-builder/scripts/esql_query_smoke.pyRead routing metadata only when the managed repo-skill router is being rebuilt; it is structured metadata, not a user workflow reference.