Passa al contenuto principale

Class: SimpleDocumentStore

Extends

  • KVDocumentStore

Constructors

new SimpleDocumentStore()

new SimpleDocumentStore(kvStore?, namespace?): SimpleDocumentStore

Parameters

kvStore?: SimpleKVStore

namespace?: string

Returns

SimpleDocumentStore

Overrides

KVDocumentStore.constructor

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:17

Properties

kvStore

private kvStore: SimpleKVStore

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:15

Methods

addDocuments()

addDocuments(docs, allowUpdate): Promise<void>

Parameters

docs: BaseNode <Metadata>[]

allowUpdate: boolean= true

Returns

Promise<void>

Inherited from

KVDocumentStore.addDocuments

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:40


deleteDocument()

deleteDocument(docId, raiseError, removeRefDocNode): Promise<void>

Parameters

docId: string

raiseError: boolean= true

removeRefDocNode: boolean= true

Returns

Promise<void>

Inherited from

KVDocumentStore.deleteDocument

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:143


deleteRefDoc()

deleteRefDoc(refDocId, raiseError): Promise<void>

Parameters

refDocId: string

raiseError: boolean= true

Returns

Promise<void>

Inherited from

KVDocumentStore.deleteRefDoc

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:160


docs()

docs(): Promise<Record<string, BaseNode <Metadata>>>

Returns

Promise<Record<string, BaseNode <Metadata>>>

Inherited from

KVDocumentStore.docs

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:26


documentExists()

documentExists(docId): Promise<boolean>

Parameters

docId: string

Returns

Promise<boolean>

Inherited from

KVDocumentStore.documentExists

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:117


getAllDocumentHashes()

getAllDocumentHashes(): Promise<Record<string, string>>

Returns

Promise<Record<string, string>>

Inherited from

KVDocumentStore.getAllDocumentHashes

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:191


getAllRefDocInfo()

getAllRefDocInfo(): Promise<undefined | Record<string, RefDocInfo>>

Returns

Promise<undefined | Record<string, RefDocInfo>>

Inherited from

KVDocumentStore.getAllRefDocInfo

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:105


getDocument()

getDocument(docId, raiseError): Promise<undefined | BaseNode <Metadata>>

Parameters

docId: string

raiseError: boolean= true

Returns

Promise<undefined | BaseNode <Metadata>>

Inherited from

KVDocumentStore.getDocument

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:82


getDocumentHash()

getDocumentHash(docId): Promise<undefined | string>

Parameters

docId: string

Returns

Promise<undefined | string>

Inherited from

KVDocumentStore.getDocumentHash

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:186


getNode()

getNode(nodeId, raiseError): Promise <BaseNode <Metadata>>

Parameters

nodeId: string

raiseError: boolean= true

Returns

Promise <BaseNode <Metadata>>

Inherited from

KVDocumentStore.getNode

Source

packages/llamaindex/src/storage/docStore/types.ts:55


getNodeDict()

getNodeDict(nodeIdDict): Promise<Record<number, BaseNode <Metadata>>>

Parameters

nodeIdDict

Returns

Promise<Record<number, BaseNode <Metadata>>>

Inherited from

KVDocumentStore.getNodeDict

Source

packages/llamaindex/src/storage/docStore/types.ts:63


getNodes()

getNodes(nodeIds, raiseError): Promise <BaseNode <Metadata>[]>

Parameters

nodeIds: string[]

raiseError: boolean= true

Returns

Promise <BaseNode <Metadata>[]>

Inherited from

KVDocumentStore.getNodes

Source

packages/llamaindex/src/storage/docStore/types.ts:49


getRefDocInfo()

getRefDocInfo(refDocId): Promise<undefined | RefDocInfo>

Parameters

refDocId: string

Returns

Promise<undefined | RefDocInfo>

Inherited from

KVDocumentStore.getRefDocInfo

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:100


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string= undefined

Returns

Promise<void>

Overrides

KVDocumentStore.persist

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:43


refDocExists()

refDocExists(refDocId): Promise<boolean>

Parameters

refDocId: string

Returns

Promise<boolean>

Inherited from

KVDocumentStore.refDocExists

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:113


setDocumentHash()

setDocumentHash(docId, docHash): Promise<void>

Parameters

docId: string

docHash: string

Returns

Promise<void>

Inherited from

KVDocumentStore.setDocumentHash

Source

packages/llamaindex/src/storage/docStore/KVDocumentStore.ts:181


toDict()

toDict(): SaveDict

Returns

SaveDict

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:62


fromDict()

static fromDict(saveDict, namespace?): SimpleDocumentStore

Parameters

saveDict: SaveDict

namespace?: string

Returns

SimpleDocumentStore

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:57


fromPersistDir()

static fromPersistDir(persistDir, namespace?): Promise <SimpleDocumentStore>

Parameters

persistDir: string= DEFAULT_PERSIST_DIR

namespace?: string

Returns

Promise <SimpleDocumentStore>

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:24


fromPersistPath()

static fromPersistPath(persistPath, namespace?): Promise <SimpleDocumentStore>

Parameters

persistPath: string

namespace?: string

Returns

Promise <SimpleDocumentStore>

Source

packages/llamaindex/src/storage/docStore/SimpleDocumentStore.ts:35