Actions15
Search
AI-generatedSummary
Searches an in-memory vector database using vector similarity, BM25 keyword matching, or hybrid search, with optional metadata filtering.
Inputs
- databaseName (required) — The name of the in-memory database instance to query.
- searchMode — Search strategy: 'vector' (vector similarity), 'keyword' (BM25 full-text), or 'hybrid' (combined vector and keyword search).
- queryVector (required) — JSON array of numbers representing the query vector. Required when searchMode is 'vector' or 'hybrid'.
- keywords (required) — Search phrase or term for BM25 text search. Required when searchMode is 'keyword' or 'hybrid'.
- textFields — Comma-separated list of metadata key names to inspect during BM25 keyword search. Defaults to 'content,text,title,description'.
- topK — Maximum number of matching results to return. Defaults to 10.
- includeVectors — When enabled, includes the stored numerical vector array inside each returned item.
- minSimilarity — Filters out results with a similarity score below this threshold.
- useFilter — Enables metadata filtering on search results.
- metadataFilter — JSON object defining condition filters on vector metadata (e.g. {"category": "tech"} or {"score": {"$gt": 0.5}}).
- hybridAlpha — Balance weight between vector (1.0) and keyword (0.0) search results in hybrid mode. Defaults to 0.5.
- fusionMethod — Ranking fusion algorithm for hybrid search: 'rrf' (Reciprocal Rank Fusion) or 'weighted' score combination.
- bm25K1 — BM25 term frequency saturation parameter (0 to 3). Defaults to 1.2.
- bm25B — BM25 document length normalization parameter (0 to 1). Defaults to 0.75.
Output shape
A single object containing search execution details and a list of matching records in the results array.
The output object includes
success,searchMode,k,filterApplied,resultsCount, andresults. Each element insideresultscontainsid,score, optional metadata, relevant rank/score metrics depending on search mode, and thevectorarray ifincludeVectorsis true.
Examples
Example 1: Perform a vector similarity search using embeddings from a previous node
Set Database Name to 'docs', Search Mode to 'Vector Only', Query Vector to ={{ $json.embedding }}, and Number of Results (K) to 5.
Example 2: Execute a hybrid search combining vector embeddings and BM25 keywords with metadata filter
Set Search Mode to 'Hybrid', Query Vector to ={{ $json.embedding }}, Keywords to 'automation workflow', set Use Metadata Filter to true, and set Metadata Filter to {"status": "active"}.