mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-09 15:38:08 -05:00
Add support for Elasticsearch with the following tools: * search * esql * get_mappings * list_indices This PR fixes #859 --------- Co-authored-by: duwenxin <duwenxin@google.com> Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
2.0 KiB
2.0 KiB
title, type, weight, description
| title | type | weight | description |
|---|---|---|---|
| elasticsearch-esql | docs | 2 | Execute ES|QL queries. |
elasticsearch-esql
Execute ES|QL queries.
This tool allows you to execute ES|QL queries against your Elasticsearch cluster. You can use this to perform complex searches and aggregations.
See the official documentation for more information.
Example
tools:
query_my_index:
kind: elasticsearch-esql
source: elasticsearch-source
description: Use this tool to execute ES|QL queries.
query: |
FROM my-index
| KEEP *
| LIMIT ?limit
parameters:
- name: limit
type: integer
description: Limit the number of results.
required: true
Parameters
| name | type | required | description |
|---|---|---|---|
| query | string | false | The ES|QL query to run. Can also be passed by parameters. |
| format | string | false | The format of the query. Default is json. Valid values are csv, json, tsv, txt, yaml, cbor, smile, or arrow. |
| timeout | integer | false | The timeout for the query in seconds. Default is 60 (1 minute). |
| parameters | parameters | false | List of parameters that will be used with the ES|QL query. Only supports “string”, “integer”, “float”, “boolean”. |