search
Query Elasticsearch indices with advanced filters, pagination, and time-based sorting to locate specific documents efficiently. Ideal for targeted data retrieval and analysis.
Instructions
Search documents in Elasticsearch index with advanced filtering, pagination, and time-based sorting capabilities
Input Schema
Name | Required | Description | Default |
---|---|---|---|
date_from | No | Start date filter in ISO format (YYYY-MM-DD) | |
date_to | No | End date filter in ISO format (YYYY-MM-DD) | |
fields | No | Specific fields to include in search results | |
index | Yes | Name of the Elasticsearch index to search | |
query | Yes | Search query text to find matching documents | |
size | No | Maximum number of results to return | |
sort_by_time | No | Sort order by timestamp | desc |
time_period | No | Predefined time period filter (e.g., '7d', '1m', '1y') |
Input Schema (JSON Schema)
{
"properties": {
"date_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Start date filter in ISO format (YYYY-MM-DD)",
"title": "Date From"
},
"date_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "End date filter in ISO format (YYYY-MM-DD)",
"title": "Date To"
},
"fields": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Specific fields to include in search results",
"title": "Fields"
},
"index": {
"description": "Name of the Elasticsearch index to search",
"title": "Index",
"type": "string"
},
"query": {
"description": "Search query text to find matching documents",
"title": "Query",
"type": "string"
},
"size": {
"default": 10,
"description": "Maximum number of results to return",
"maximum": 1000,
"minimum": 1,
"title": "Size",
"type": "integer"
},
"sort_by_time": {
"default": "desc",
"description": "Sort order by timestamp",
"pattern": "^(asc|desc)$",
"title": "Sort By Time",
"type": "string"
},
"time_period": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Predefined time period filter (e.g., '7d', '1m', '1y')",
"title": "Time Period"
}
},
"required": [
"index",
"query"
],
"type": "object"
}