← All nodes
Actions a_structured_search

Structured Search

Runs parametrised SQL against searchable records for filter/sort/range queries.

What does it do?

Searches your database using precise filters.

How does it work?

Performs a structured search by metadata or tags instead of searching by 'word similarity'.

Why use it?

Essential for e-commerce catalogs. When a customer says "I want a size M in red", you need an exact search, not a semantic one.

Inputs

nametype
text string
filter object
sort object
limit number

Outputs

nametype
top_hits array
count number
total_estimate number
branch string
answer string
blocks array

Branches

Fixed branches

  • hits — Hits
  • empty — Empty

Configuration

collection "products" required default: "products"
query_field string required default: "text"
filter_field string required default: "filter"
sort_field string required default: "sort"
limit_field string required default: "limit"
limit integer required default: 10
memory_key string optional
branch_when_hits string required default: "hits"
branch_when_empty string required default: "empty"
output_field string required default: "top_hits"
emit_blocks boolean required default: false
block_actions array<string> optional

Default configuration

{
  "collection": "products",
  "query_field": "text",
  "filter_field": "filter",
  "sort_field": "sort",
  "limit_field": "limit",
  "limit": 10,
  "branch_when_hits": "hits",
  "branch_when_empty": "empty",
  "output_field": "top_hits",
  "emit_blocks": false
}

Emitted events

This node does not publish events on the pubsub channel.