InMemoryRecordStorage
open class InMemoryRecordStorage(defaultNamespace: String = "default") : SearchStorage<TextDocument, SearchRequest> , WriteStorage<TextDocument> , LookupStorage<TextDocument> , DeletionStorage(source)
In-memory implementation of SearchStorage and WriteStorage that stores records in a map.
This implementation is useful for testing, development, and scenarios where persistence is not required. All data is stored in memory and will be lost when the application stops.
Limitations:
Data is not persisted and will be lost on application restart
Both ai.koog.rag.base.storage.search.KeywordSearchRequest and ai.koog.rag.base.storage.search.SimilaritySearchRequest are accepted, but both are implemented as simple case-insensitive substring matching; no vector embeddings are used
Filter expressions are ignored
Parameters
defaultNamespace
The default namespace to use when none is specified in method calls. Defaults to "default".
Functions
Link copied to clipboard
Link copied to clipboard
open suspend override fun search(request: SearchRequest, namespace: String?): List<SearchResult<TextDocument>>