Operation to search for items within a specified namespace hierarchy.
This operation supports both structured filtering and natural language search within a given namespace prefix. It provides pagination through limit and offset parameters.
Natural language search support depends on your store implementation.
Search with filters and pagination:
SearchOp(
namespace_prefix=("documents",),
filter={"type": "report", "status": "active"},
limit=5,
offset=10
)
Natural language search:
SearchOp(
namespace_prefix=("users", "content"),
query="technical documentation about APIs",
limit=20
)SearchOp()NamedTupleHierarchical path prefix defining the search scope.
() # Search entire store
("documents",) # Search all documents
("users", "content") # Search within user contentKey-value pairs for filtering results based on exact matches or comparison operators.
The filter supports both exact matches and operator-based comparisons.
Maximum number of items to return in the search results.
Number of matching items to skip for pagination.
Natural language search query for semantic search capabilities.
Whether to refresh TTLs for the returned item.
If no TTL was specified for the original item(s), or if TTL support is not enabled for your adapter, this argument is ignored.