search(namespacePrefix: string[], options: __type = {}): Promise<SearchItem[]>| Name | Type | Description |
|---|---|---|
namespacePrefix* | string[] | The namespace prefix to search within |
options | __type | Default: {}Search options including search mode, filters, query text, and pagination |
// Basic text search
const results = await store.search(["documents"], {
query: "machine learning",
mode: "text"
});
// Vector search
const results = await store.search(["documents"], {
query: "machine learning",
mode: "vector",
similarityThreshold: 0.7
});
// Hybrid search (combining vector and text)
const results = await store.search(["documents"], {
query: "machine learning",
mode: "hybrid",
vectorWeight: 0.7
});
// Filtered search
const results = await store.search(["products"], {
filter: { category: "electronics", price: { $lt: 100 } }
});Search for items in the store with support for text search, vector search, and filtering.