Interface: OptsHybrid<DocMeta, Filter>
Options for creating a hybrid Datastore instance (with Splade).
Extends
Opts<DocMeta,Filter>
Type parameters
| Parameter |
|---|
DocMeta extends BaseMeta |
Filter extends BaseFilter<DocMeta> |
Properties
| Property | Type | Description | Inheritance | Source |
|---|---|---|---|---|
cache? | CacheStorage<string, QueryResult<DocMeta>> | Enables caching for queries. Must implement .get(key) and .set(key, value), both of which can be either sync or async.Some examples include: new Map(), quick-lru (opens in a new tab), or any keyv adaptor (opens in a new tab). | Opts.cache | src/datastore/types.ts:95 (opens in a new tab) |
cacheKey? | CacheKey<Query<DocMeta, Filter>, string> | A function that returns a cache key for the given params. A simple example would be: (params) => JSON.stringify(params)The default cacheKey function uses hash-object (opens in a new tab) to create a stable sha256 hash of the params. | Opts.cacheKey | src/datastore/types.ts:89 (opens in a new tab) |
contentKey | keyof DocMeta | The metadata key of the content that is embedded. The value associated with the key must be a string. | Opts.contentKey | src/datastore/types.ts:79 (opens in a new tab) |
context? | Ctx | - | Opts.context | src/datastore/types.ts:97 (opens in a new tab) |
debug? | boolean | Whether or not to add default console.log event handlers | Opts.debug | src/datastore/types.ts:99 (opens in a new tab) |
embeddingModel | EmbeddingModel | - | Opts.embeddingModel | src/datastore/types.ts:81 (opens in a new tab) |
events? | Events<DocMeta, Filter> | - | Opts.events | src/datastore/types.ts:96 (opens in a new tab) |
namespace? | string | - | Opts.namespace | src/datastore/types.ts:80 (opens in a new tab) |
spladeModel | SparseVectorModel | Splade instance for creating sparse vectors | - | src/datastore/types.ts:110 (opens in a new tab) |