Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

elasticsearchElasticsearch 搜索引擎

Agent Skill

elasticsearch 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

48,169

周安装

2,048

GitHub Stars

5

下载量

16,876
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:elasticsearch(Elasticsearch 搜索引擎)
来源仓库:https://github.com/ivangdavila/elasticsearch
安装命令:
openclaw skills install elasticsearch
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install elasticsearch

简介

使用映射、分析器和搜索模式对 Elasticsearch 进行高效查询与索引。

  • 适用于 OpenClaw 中需要全文检索、日志分析或结构化数据筛选的任务。
  • 可辅助优化分词策略、聚合查询和结果排序逻辑。
  • 安装前需确认集群地址与认证方式,避免越权访问。
  • 搜索结果应标注来源,不可将推测内容包装为确定事实。

SKILL.md

name
Elasticsearch
description
Query and index Elasticsearch with proper mappings, analyzers, and search patterns.
metadata
{"clawdbot":{"emoji":"🔍","requires":{"anyBins":["curl"]},"os":["linux","darwin","win32"]}}

Mapping Mistakes

  • Always define explicit mappings—dynamic mapping guesses wrong (first "123" makes field integer, later "abc" fails)
  • text for full-text search, keyword for exact match/aggregations—using text for IDs breaks filters
  • Can't change field type after indexing—must reindex to new index with correct mapping
  • Set dynamic: "strict" to reject unmapped fields—catches typos in field names

Text vs Keyword

  • text is analyzed (tokenized, lowercased)—"Quick Brown" matches search for "quick"
  • keyword is exact bytes—"Quick Brown" only matches exactly "Quick Brown"
  • Need both? Use multi-field: "title": { "type": "text", "fields": { "raw": { "type": "keyword" }}}
  • Sort/aggregate on title.raw, search on title

Query vs Filter Context

  • Query context calculates relevance score—expensive, use for search ranking
  • Filter context is yes/no—cacheable, use for exact conditions (status, date ranges)
  • Combine: bool.must for scoring, bool.filter for filtering without scoring
  • Range queries on dates/numbers almost always belong in filter, not query

Analyzers

  • standard analyzer lowercases and removes punctuation—fine for most text
  • keyword analyzer keeps exact string—use for codes, SKUs, emails
  • Language analyzers (english) stem words—"running" matches "run"
  • Test analyzer with _analyze endpoint before indexing—surprises in production hurt

Nested vs Object

  • Object type flattens arrays—{"tags": [{"key":"a","val":1}, {"key":"b","val":2}]} becomes tags.key: [a,b], tags.val: [1,2]
  • Flattened loses association—query key=a AND val=2 incorrectly matches above
  • Use nested type to preserve object boundaries—requires nested query wrapper
  • Nested is expensive—avoid for high-cardinality arrays

Pagination Traps

  • from + size limited to 10,000 hits—deep pagination fails
  • search_after for deep pagination—requires consistent sort, typically _id
  • Scroll API for bulk export—keeps point-in-time view, but ties up resources
  • Don't use scroll for user pagination—search_after is correct choice

Bulk Operations

  • Never index documents one-by-one—use _bulk API, 5-15MB batches
  • Bulk format: newline-delimited JSON, action line then document line
  • Check response for partial failures—bulk can succeed overall with individual doc errors
  • Set refresh=false during bulk loads—refresh after batch completes

Performance

  • _source: false with stored_fields if you don't need full document—reduces I/O
  • Use filter for cacheable conditions—Elasticsearch caches filter results
  • Avoid leading wildcards (*term)—forces full scan; use reverse field for suffix search
  • profile: true shows query execution breakdown—find slow clauses

Sharding

  • Shard size 10-50GB optimal—too small = overhead, too large = slow recovery
  • Number of shards fixed at creation—can't reshard without reindexing
  • Replicas for read throughput and availability—set based on query load
  • Start with 1 shard for small indices—over-sharding kills performance

Index Management

  • Use index templates—new indices get consistent mappings and settings
  • Use aliases for zero-downtime reindexing—point alias to new index after reindex
  • ILM (Index Lifecycle Management) for time-series—auto-rollover, delete old indices
  • Close unused indices to free memory—closed index uses no heap

Aggregations

  • terms agg needs keyword field—text fields fail or give garbage
  • Default size: 10 on terms agg—increase to get all buckets, or use composite
  • Cardinality is approximate (HyperLogLog)—exact count requires scanning all docs
  • Nested aggs require nested wrapper—matches nested query pattern

Common Errors

  • "cluster_block_exception"—disk > 85%, cluster goes read-only; clear disk, reset with _cluster/settings
  • "version conflict"—concurrent update; retry with retry_on_conflict or use optimistic locking
  • "circuit_breaker_exception"—query uses too much memory; reduce aggregation scope
  • Mapping explosion from dynamic fields—set index.mapping.total_fields.limit and use strict mapping

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

74.16%
按下载量换算12,515

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills