Retrievers

Agent Grid Search

Search within an Agent Grid using Elasticsearch queries. Executes the search and returns results.

Category: Retrievers · Plans: Trial, Starter, Pro, Premium, Enterprise · Type: AgentGridSearch

Inputs#

FieldTypeRequiredDefaultWhat it does
Agent GridChoiceYes—Select the Agent Grid to search in.
Elasticsearch QueryObjectNo—Define the Elasticsearch query structure with variable support. Leave empty to return all results.
Result LimitNumberNo50Maximum number of rows to return.

%!s()#

Supported Elasticsearch Query Types#

For full documentation, see the Elasticsearch Query DSL Reference.

match_all#

Returns all documents. Documentation

json
{"query": {"match_all": {}}}

match#

Full-text search on a field. Documentation

json
{"query": {"match": {"field_name": "search text"}}}

match_phrase#

Exact phrase match. Documentation

json
{"query": {"match_phrase": {"field_name": "exact phrase"}}}

term#

Exact value match (for keyword fields). Documentation

json
{"query": {"term": {"status": "active"}}}

terms#

Match any of multiple values. Documentation

json
{"query": {"terms": {"status": ["active", "pending"]}}}

bool#

Combine queries with must/should/must_not/filter. Documentation

json
{
  "query": {
    "bool": {
      "must": [{"match": {"title": "search"}}],
      "filter": [{"term": {"status": "published"}}]
    }
  }
}

range#

Numeric or date ranges. Documentation

json
{"query": {"range": {"created_at": {"gte": "2024-01-01", "lte": "2024-12-31"}}}}

wildcard#

Pattern matching with wildcards. Documentation

json
{"query": {"wildcard": {"name": "*test*"}}}

prefix#

Prefix matching. Documentation

json
{"query": {"prefix": {"name": "test"}}}

multi_match#

Search across multiple fields. Documentation

json
{"query": {"multi_match": {"query": "search text", "fields": ["title", "description"]}}}

Empty Query#

Leave empty to return all results (equivalent to match_all).

Outputs#

OutputType
Agent Grid IdAny
Agent Grid NameAny
Total CountAny
Returned CountAny
RowsAny

Use as an agent tool#

Tool name: agentgridsearch

Search within an Agent Grid using Elasticsearch queries. Executes the search and returns results.