Filtering and searching records
Use exact filters, semantic search, or both to find Records and provide context to Flows and Agents.
Filter records
Use exact or partial matches on metadata fields and top-level record fields.
In the dashboard
In the dashboard, follow these steps:
- Go to Records.
- Select a Record type.
- Use the filter builder to add metadata conditions and select an operator.
Filter syntax in Flows
Use a record filter with List Records to return multiple matches.
Use Get Record to return the most recently updated matching Record.
The filter requires a type field and can include a where clause with conditions or groups:
The where clause supports these operators:
eq,neq: test equality.gt,gte,lt,lte: compare numeric values.contains,startsWith,endsWith: match strings.in,notIn: match values in or outside a set.isSet,isNotSet: check whether a field exists.isTrue,isFalse: match Boolean values.between: match a numeric range.withinLastDays,olderThanDays: match values relative to the current date.
Use "op": "and" or "op": "or" in a group to combine conditions.
Null and missing values
Value operators such as eq, gt, and contains do not match Records where the field is
missing or set to JSON null.
The neq and notIn operators also match those Records, which matches SQL null behavior.
For example, a neq filter on a field that most Records do not have also returns those Records.
To filter only by field existence, use isSet or isNotSet.
The date-relative filters withinLastDays and olderThanDays match ISO 8601 date and date-time strings.
For example, 2026-01-15T00:00:00.000Z is a valid value.
These filters also support the top-level timestamp fields createdAt and updatedAt.
Comparison and range operators match JSON numbers and numeric strings such as 42 or 3.14.
The filter does not match values in other formats.
Semantic search
Use natural-language queries to find Records by meaning.
How it works
Runtype converts your query into a vector embedding and finds Records with similar embeddings. The search uses conceptual similarity instead of exact keyword matching.
Example queries
Use queries such as these for semantic search:
"How do I reset my password?"finds password reset documentation."Affordable laptops for students"finds budget laptop records."Shipping delays"finds policies and updates about shipping.
In Flows
Set the Query field in a Vector Search step to a template such as:
The template reads the userQuestion flow variable.
The step returns Records ranked by similarity score.
Embed text-heavy fields such as descriptions, content, and article bodies for semantic search. Use exact filters for structured values such as IDs and numbers.
Combining filters and semantic search
The Vector Search step accepts a semantic query and optional metadata filters.
For the built-in Record store, set recordType to scope results.
Weaviate applies metadataFilters as equality constraints.
The built-in Record store and Cloudflare Vectorize do not use metadataFilters to filter results.
Combine these settings to search within a Record type:
- Query:
"Technical issues with Widget Pro". - Record type:
support.
This combination finds semantically relevant support articles in the support Record type.
Result ranking
Search results use these ranking rules:
- Filter search: returns all matching Records without relevance ranking.
- Semantic search: uses the similarity score, with the most similar Records first.
Set the limit field to cap the number of semantic search results. For example:
Record type filtering
To search within a specific Record type in the built-in Record store, set recordType in a Vector Search step:
Omit recordType to search across all Record types in the built-in Record store.
A broader search can take longer.
Field selection
Choose the data that each search uses:
- Embedded fields: configure the Generate Embedding step with the text to embed for semantic search.
- Filterable fields: use metadata fields in record filters for exact matching.
Performance considerations
Use these options to narrow searches and limit the number of returned Records:
- Set
recordTypewhen your vector store supports type filtering. - Add
metadataFilterswhen the selected vector store supports them. - Set
limitto cap the number of semantic search results.
Search examples
Customer lookup
Use a record filter to find a customer by email:
High-value customers
Use a record filter to find customers with a high lifetime value:
Knowledge base search
Use a Vector Search step to search a knowledge base:
The userQuestion flow variable supplies the query text.
Product recommendations
Combine a Vector Search step with a Record type filter:
The userPreferences flow variable supplies the query text.
Next steps
Continue with these guides:
- Creating and managing records: create and organize Records.
- Using records in flows: add record lookups to Flows.
- What are Records?: learn how Runtype organizes Records.