返回 Skill 列表
extension
分类: 开发与工程无需 API Key

elasticsearch-daemon

通过FGP守护进程实现快速的Elasticsearch操作 - 比每次请求都启动curl快20-40倍。当用户需要搜索文档、索引数据、运行聚合或管理索引时使用。触发条件为“elasticsearch search”、“es query”、“index document”、“elastic aggregation”、“search index”。

person作者: jakexiaohubgithub

FGP Elasticsearch Daemon

Fast Elasticsearch search and indexing operations.

Why FGP?

| Operation | FGP Daemon | curl/REST | Speedup | |-----------|------------|-----------|---------| | Search | 5ms | 150ms | 30x | | Index doc | 8ms | 180ms | 22x | | Bulk index | 20ms | 400ms | 20x | | Aggregation | 15ms | 200ms | 13x |

Installation

brew install fast-gateway-protocol/fgp/fgp-elasticsearch

Setup

export ELASTICSEARCH_URL="http://localhost:9200"
# Or Elastic Cloud
export ELASTICSEARCH_URL="https://my-cluster.es.us-east-1.aws.found.io"
export ELASTICSEARCH_API_KEY="..."

fgp start elasticsearch

Available Commands

| Command | Description | |---------|-------------| | es.search | Search documents | | es.get | Get document by ID | | es.index | Index document | | es.bulk | Bulk operations | | es.delete | Delete document | | es.count | Count documents | | es.indices | List indices | | es.mapping | Get index mapping | | es.aggregate | Run aggregations |

Example Workflows

# Search
fgp call es.search --index products --query '{"match": {"name": "laptop"}}'

# Index document
fgp call es.index --index logs --document '{"message": "User logged in", "@timestamp": "2026-01-17T12:00:00Z"}'

# Aggregation
fgp call es.aggregate --index sales --aggs '{"by_category": {"terms": {"field": "category"}}}'