Skip to main content

keywordSearch

Performs full-text keyword search across entries in a dataset via the data-cluster's search API. Uses PostgreSQL to_tsvector / to_tsquery for stemming, stop-word removal, and tf-idf relevance ranking. Results are filtered client-side by min_score after the API response is received.

Parameters

ParamTypeRequiredDefaultDescription
querystringYesSearch query text. Minimum length: 1
dataset_idintegerYesID of the dataset to search. Must be greater than 0
limitintegerNo20Maximum number of results to return. Range: 1–100
offsetintegerNo0Pagination offset
tagsstring[]No[]Filter results by entry tags
statusstring?NonullFilter results by entry status
mime_typesstring[]No[]Filter results by MIME types
min_scorefloatNo0.0Minimum relevance score to include. Range: 0.0–1.0. Applied both server-side and as a client-side post-filter

Output

FieldTypeDescription
resultsKeywordSearchHit[]Search result hits, filtered by min_score
total_countintegerTotal number of matches found (before limit/offset)
has_morebooleanWhether additional results exist beyond the current page
querystringThe original query text
execution_time_msfloatWall-clock time for the operation in milliseconds
results_returnedintegerNumber of hits in results after client-side score filtering

Each KeywordSearchHit:

FieldTypeDescription
entry_idintegerEntry ID
dataset_idintegerDataset ID
namestringEntry name
titlestringDocument title
descriptionstringDocument description
scorefloatRelevance ranking score
highlightedobject?Fields with matched terms wrapped in <mark> tags
metadataobject?Additional metadata such as mime_type, status, tags, created_at

Example

{
"id": "keywordSearch",
"type": "keywordSearch",
"data": {
"label": "Keyword Search",
"isExecuted": false,
"handles": ["inputs", "outputs"],
"schema": {},
"params": {
"query": { "value": "{{ $input.query }}", "isExpression": true, "isAttachedToInputNode": false },
"dataset_id": { "value": 42, "isExpression": false, "isAttachedToInputNode": false },
"limit": { "value": 10, "isExpression": false, "isAttachedToInputNode": false },
"min_score": { "value": 0.3, "isExpression": false, "isAttachedToInputNode": false }
},
"inputs": [], "outputs": [], "errors": []
},
"position": { "x": 0, "y": 0 },
"isSelected": false,
"isDragging": false
}