Postgres
PostgresDocumentStore #
基类: KVDocumentStore
Postgres 文档 (节点) 存储。
用于存储 Document 和 Node 对象的 Postgres 存储。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
postgres_kvstore
|
PostgresKVStore
|
Postgres 键值存储 |
必需 |
命名空间
|
str
|
文档存储的命名空间 |
无
|
batch_size
|
int
|
批量操作的批处理大小 |
DEFAULT_BATCH_SIZE
|
源代码位于 llama-index-integrations/storage/docstore/llama-index-storage-docstore-postgres/llama_index/storage/docstore/postgres/base.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
from_uri classmethod
#
from_uri(uri: str, namespace: Optional[str] = None, table_name: str = 'docstore', schema_name: str = 'public', perform_setup: bool = True, debug: bool = False, use_jsonb: bool = False) -> PostgresDocumentStore
从 Postgres URI 加载 PostgresDocumentStore。
源代码位于 llama-index-integrations/storage/docstore/llama-index-storage-docstore-postgres/llama_index/storage/docstore/postgres/base.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
from_params classmethod
#
from_params(host: Optional[str] = None, port: Optional[str] = None, database: Optional[str] = None, user: Optional[str] = None, password: Optional[str] = None, namespace: Optional[str] = None, table_name: str = 'docstore', schema_name: str = 'public', perform_setup: bool = True, debug: bool = False, use_jsonb: bool = False) -> PostgresDocumentStore
从 Postgres 主机和端口加载 PostgresDocumentStore。
源代码位于 llama-index-integrations/storage/docstore/llama-index-storage-docstore-postgres/llama_index/storage/docstore/postgres/base.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|