| Name | Type | Description |
|---|---|---|
namespace_prefix* | Sequence[str] | List of strings representing the namespace prefix. |
filter | Mapping[str, Any] | None | Default: NoneOptional dictionary of key-value pairs to filter results. |
limit | int | Default: 10 |
offset | int | Default: 0 |
query | str | None | Default: None |
refresh_ttl | bool | None | Default: None |
headers | Mapping[str, str] | None | Default: None |
params | QueryParamTypes | None | Default: None |
Search for items within a namespace prefix.
client = get_sync_client(url="http://localhost:8123")
items = client.store.search_items(
["documents"],
filter={"author": "John Doe"},
limit=5,
offset=0
)
print(items)
----------------------------------------------------------------
{
"items": [
{
"namespace": ["documents", "user123"],
"key": "item789",
"value": {
"title": "Another Document",
"author": "John Doe"
},
"created_at": "2024-07-30T12:00:00Z",
"updated_at": "2024-07-30T12:00:00Z"
},
# ... additional items ...
]
}Maximum number of items to return (default is 10).
Number of items to skip before returning results (default is 0).
Optional query for natural language search.
Whether to refresh the TTL on items returned by this search. If None, uses the store's default behavior.
Optional custom headers to include with the request.
Optional query parameters to include with the request.