searchItems(namespacePrefix: string[], options: __type): Promise<SearchItemsResponse>| Name | Type | Description |
|---|---|---|
namespacePrefix* | string[] | List of strings representing the namespace prefix. |
options | __type |
const results = await client.store.searchItems(
["documents"],
{
filter: { author: "John Doe" },
limit: 5,
refreshTtl: true
}
);
console.log(results);
// {
// items: [
// {
// namespace: ["documents", "user123"],
// key: "item789",
// value: { title: "Another Document", author: "John Doe" },
// createdAt: "2024-07-30T12:00:00Z",
// updatedAt: "2024-07-30T12:00:00Z"
// },
// // ... additional items ...
// ]
// }Search for items within a namespace prefix.