**feat(docs): add comprehensive Search and Metadata Guide with metadata handling updates**
- **Documentation Additions**:
- Introduced `SEARCH_AND_METADATA_GUIDE.md` to provide an in-depth guide on Brainy's search and metadata retrieval system:
- Detailed explanation of search workflows, metadata structures (`GraphNoun`, `GraphVerb`), and core components like `SearchResult`.
- Usage examples showcasing search queries, filtering by noun/verb types, and advanced features like multi-modal search.
- Included performance tips on caching, HNSW indexing, lazy loading, and augmentation pipeline.
- **Storage System Updates**:
- Enhanced memory and file storage adapters to support dedicated noun and verb metadata handling:
- Added methods `saveN
This commit is contained in:
parent
3892399bab
commit
cc6c75befb
5 changed files with 472 additions and 4 deletions
|
|
@ -10,6 +10,8 @@ import { BaseStorageAdapter } from './adapters/baseStorageAdapter.js'
|
|||
export const NOUNS_DIR = 'nouns'
|
||||
export const VERBS_DIR = 'verbs'
|
||||
export const METADATA_DIR = 'metadata'
|
||||
export const NOUN_METADATA_DIR = 'noun-metadata'
|
||||
export const VERB_METADATA_DIR = 'verb-metadata'
|
||||
export const INDEX_DIR = 'index'
|
||||
export const STATISTICS_KEY = 'statistics'
|
||||
|
||||
|
|
@ -672,6 +674,30 @@ export abstract class BaseStorage extends BaseStorageAdapter {
|
|||
*/
|
||||
public abstract getMetadata(id: string): Promise<any | null>
|
||||
|
||||
/**
|
||||
* Save noun metadata to storage
|
||||
* This method should be implemented by each specific adapter
|
||||
*/
|
||||
public abstract saveNounMetadata(id: string, metadata: any): Promise<void>
|
||||
|
||||
/**
|
||||
* Get noun metadata from storage
|
||||
* This method should be implemented by each specific adapter
|
||||
*/
|
||||
public abstract getNounMetadata(id: string): Promise<any | null>
|
||||
|
||||
/**
|
||||
* Save verb metadata to storage
|
||||
* This method should be implemented by each specific adapter
|
||||
*/
|
||||
public abstract saveVerbMetadata(id: string, metadata: any): Promise<void>
|
||||
|
||||
/**
|
||||
* Get verb metadata from storage
|
||||
* This method should be implemented by each specific adapter
|
||||
*/
|
||||
public abstract getVerbMetadata(id: string): Promise<any | null>
|
||||
|
||||
/**
|
||||
* Save a noun to storage
|
||||
* This method should be implemented by each specific adapter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue