Memory (In-Memory Vector Store)
Example Code: examples/knowledge/vectorstores/inmemory
In-memory vector store is the simplest implementation, suitable for development testing and small-scale data scenarios.
Basic Configuration
Configuration Options
| Option | Description | Default |
|---|---|---|
WithMaxResults(n) |
Default number of search results | 10 |
Features
- ✅ Zero configuration, works out of the box
- ✅ Supports all filter functionality (including FilterCondition)
- ⚠️ Data not persisted, lost after restart
- ⚠️ Only suitable for development and testing environments
Search Modes
| Mode | Support | Description |
|---|---|---|
| Vector | ✅ | Vector similarity search (cosine similarity) |
| Filter | ✅ | Filter-only search, sorted by creation time |
| Hybrid | ⚠️ | Falls back to vector search |
| Keyword | ⚠️ | Falls back to filter search |