Skip to content

Commit fc802d8

Browse files
Copilotmdrxy
andauthored
docs: fix vectorstore feature table - correct "IDs in add Documents" values (#32153)
The vectorstore feature table in the documentation was showing incorrect information for the "IDs in add Documents" capability. Most vectorstores were marked as ❌ (not supported) when they actually support extracting IDs from documents. ## Problem The issue was an inconsistency between two sources of truth: - **JavaScript feature table** (`docs/src/theme/FeatureTables.js`): Hardcoded `idsInAddDocuments: false` for most vectorstores - **Python script** (`docs/scripts/vectorstore_feat_table.py`): Correctly showed `"IDs in add Documents": True` for most vectorstores ## Root Cause All vectorstores inherit the base `VectorStore.add_documents()` method which automatically extracts document IDs: ```python # From libs/core/langchain_core/vectorstores/base.py lines 277-284 if "ids" not in kwargs: ids = [doc.id for doc in documents] # If there's at least one valid ID, we'll assume that IDs should be used. if any(ids): kwargs["ids"] = ids ``` Since no vectorstores override `add_documents()`, they all inherit this behavior and support IDs in documents. ## Solution Updated `idsInAddDocuments` from `false` to `true` for 13 vectorstores: - AstraDBVectorStore, Chroma, Clickhouse, DatabricksVectorSearch - ElasticsearchStore, FAISS, InMemoryVectorStore, MongoDBAtlasVectorSearch - PGVector, PineconeVectorStore, Redis, Weaviate, SQLServer The other 4 vectorstores (CouchbaseSearchVectorStore, Milvus, openGauss, QdrantVectorStore) were already correctly marked as `true`. ## Impact Users visiting https://python.langchain.com/docs/integrations/vectorstores/ will now see accurate information. The "IDs in add Documents" column will correctly show ✅ for all vectorstores instead of incorrectly showing ❌ for most of them. This aligns with the API documentation which states: "if kwargs contains ids and documents contain ids, the ids in the kwargs will receive precedence" - clearly indicating that document IDs are supported. Fixes #30622. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to start the survey. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mdrxy <[email protected]>
1 parent b4d87c7 commit fc802d8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/src/theme/FeatureTables.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ const FEATURE_TABLES = {
10291029
passesStandardTests: false,
10301030
multiTenancy: false,
10311031
local: true,
1032-
idsInAddDocuments: false,
1032+
idsInAddDocuments: true,
10331033
},
10341034
{
10351035
name: "Chroma",
@@ -1042,7 +1042,7 @@ const FEATURE_TABLES = {
10421042
passesStandardTests: false,
10431043
multiTenancy: false,
10441044
local: true,
1045-
idsInAddDocuments: false,
1045+
idsInAddDocuments: true,
10461046
},
10471047
{
10481048
name: "Clickhouse",
@@ -1055,7 +1055,7 @@ const FEATURE_TABLES = {
10551055
passesStandardTests: false,
10561056
multiTenancy: false,
10571057
local: true,
1058-
idsInAddDocuments: false,
1058+
idsInAddDocuments: true,
10591059
},
10601060
{
10611061
name: "CouchbaseSearchVectorStore",
@@ -1081,7 +1081,7 @@ const FEATURE_TABLES = {
10811081
passesStandardTests: false,
10821082
multiTenancy: false,
10831083
local: false,
1084-
idsInAddDocuments: false,
1084+
idsInAddDocuments: true,
10851085
},
10861086
{
10871087
name: "ElasticsearchStore",
@@ -1094,7 +1094,7 @@ const FEATURE_TABLES = {
10941094
passesStandardTests: false,
10951095
multiTenancy: false,
10961096
local: true,
1097-
idsInAddDocuments: false,
1097+
idsInAddDocuments: true,
10981098
},
10991099
{
11001100
name: "FAISS",
@@ -1107,7 +1107,7 @@ const FEATURE_TABLES = {
11071107
passesStandardTests: false,
11081108
multiTenancy: false,
11091109
local: true,
1110-
idsInAddDocuments: false,
1110+
idsInAddDocuments: true,
11111111
},
11121112
{
11131113
name: "InMemoryVectorStore",
@@ -1120,7 +1120,7 @@ const FEATURE_TABLES = {
11201120
passesStandardTests: false,
11211121
multiTenancy: false,
11221122
local: true,
1123-
idsInAddDocuments: false,
1123+
idsInAddDocuments: true,
11241124
},
11251125
{
11261126
name: "Milvus",
@@ -1146,7 +1146,7 @@ const FEATURE_TABLES = {
11461146
passesStandardTests: false,
11471147
multiTenancy: false,
11481148
local: true,
1149-
idsInAddDocuments: false,
1149+
idsInAddDocuments: true,
11501150
},
11511151
{
11521152
name: "openGauss",
@@ -1172,7 +1172,7 @@ const FEATURE_TABLES = {
11721172
passesStandardTests: false,
11731173
multiTenancy: false,
11741174
local: true,
1175-
idsInAddDocuments: false,
1175+
idsInAddDocuments: true,
11761176
},
11771177
{
11781178
name: "PineconeVectorStore",
@@ -1185,7 +1185,7 @@ const FEATURE_TABLES = {
11851185
passesStandardTests: false,
11861186
multiTenancy: false,
11871187
local: true,
1188-
idsInAddDocuments: false,
1188+
idsInAddDocuments: true,
11891189
},
11901190
{
11911191
name: "QdrantVectorStore",
@@ -1211,7 +1211,7 @@ const FEATURE_TABLES = {
12111211
passesStandardTests: false,
12121212
multiTenancy: false,
12131213
local: true,
1214-
idsInAddDocuments: false,
1214+
idsInAddDocuments: true,
12151215
},
12161216
{
12171217
name: "Weaviate",
@@ -1224,7 +1224,7 @@ const FEATURE_TABLES = {
12241224
passesStandardTests: false,
12251225
multiTenancy: true,
12261226
local: true,
1227-
idsInAddDocuments: false,
1227+
idsInAddDocuments: true,
12281228
},
12291229
{
12301230
name: "SQLServer",
@@ -1237,7 +1237,7 @@ const FEATURE_TABLES = {
12371237
passesStandardTests: false,
12381238
multiTenancy: false,
12391239
local: false,
1240-
idsInAddDocuments: false,
1240+
idsInAddDocuments: true,
12411241
},
12421242
],
12431243
}

0 commit comments

Comments
 (0)