Search K
Appearance
Appearance
The Get Filters From Search node is used to dynamically retrieve available search filters based on a search term and current filter context. It interacts with the Mesh API to return a list of relevant filters, helping users refine their queries or datasets programmatically.
This task is commonly used in workflows where you need to query or refine data based on user input or pre-applied filters. It helps build dynamic user-driven interfaces where filter options must reflect the search context.
task
GetFiltersFromSearch
Label | Type | Required | Description |
---|---|---|---|
Search Text | text | โ Yes | The search string to use as the basis for retrieving filter options. |
Current Filters | json (Text) | โ Yes | A JSON object describing currently applied filters (e.g. { "filters": {}, "inputText": "", "optionsLimit": 20 } ). It defines the context used when retrieving filter options. |
The node returns a list of available filters that match the search text and are compatible with the current filter context.
The result is stored in a new variable:
AvailableSearchFilters
: A collection of ChatSearchFilter
objects available for the search context.If a user searches for "invoice" in a workflow that filters documents, this node returns all relevant filters (e.g., "Document Type", "Date Range", "Client Name") that can further narrow the search results.
Search Text
and Current Filters
fields.Current Filters
into a FilterRequestCriteria
object.ExecuteGetFilters
.AvailableSearchFilters
and marks the task as completed.Fail
and a relevant message.Current Filters
input must be a valid JSON structure matching the FilterRequestCriteria
schema.optionsLimit
is hardcoded to 20 in the current implementation.{
"filters": {
"Category": ["Finance"]
},
"inputText": "invoice",
"optionsLimit": 20
}
You can use the AvailableSearchFilters
output in a subsequent node to present or apply additional filter criteria dynamically.