@elastic/search-documents
Full-text search across any Elasticsearch index
RUN SKILL search_documents()With parameters:
RUN SKILL search_documents WITH query = 'value', index_pattern = 'value', limit = 0| Name | Type | Default | Description |
|---|---|---|---|
| query | STRING | — | Search query - keywords or phrase to search for |
| index_pattern | STRING | — | Index pattern to search (e.g., products-*, users-*) |
| limit | INT | — | Maximum results to return |
-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
-H "Content-Type: application/json" \
-d '{"query": "RUN SKILL search_documents()"}'
-- Response
{
"result": [...],
"_meta": {
"execution_id": "abc123",
"duration_ms": 45
}
}