Commit 601b0f0
committed
Move batching strategy to base vector store builder
Moving BatchingStrategy configuration from individual vector store implementations
to the base AbstractVectorStoreBuilder to reduce code duplication and provide consistent
batching behavior across all vector stores.
The default TokenCountBatchingStrategy is now set in the base builder class.1 parent 825de11 commit 601b0f0
File tree
22 files changed
+35
-309
lines changed- spring-ai-core/src/main/java/org/springframework/ai/vectorstore
- observation
- vector-stores
- spring-ai-azure-cosmos-db-store/src/main/java/org/springframework/ai/vectorstore/cosmosdb
- spring-ai-azure-store/src/main/java/org/springframework/ai/vectorstore/azure
- spring-ai-cassandra-store/src/main/java/org/springframework/ai/vectorstore/cassandra
- spring-ai-chroma-store/src/main/java/org/springframework/ai/chroma/vectorstore
- spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/elasticsearch
- spring-ai-gemfire-store/src/main/java/org/springframework/ai/vectorstore/gemfire
- spring-ai-mariadb-store/src/main/java/org/springframework/ai/vectorstore/mariadb
- spring-ai-milvus-store/src/main/java/org/springframework/ai/vectorstore/milvus
- spring-ai-mongodb-atlas-store/src/main/java/org/springframework/ai/vectorstore/mongodb/atlas
- spring-ai-neo4j-store/src/main/java/org/springframework/ai/vectorstore/neo4j
- spring-ai-opensearch-store/src/main/java/org/springframework/ai/vectorstore/opensearch
- spring-ai-oracle-store/src/main/java/org/springframework/ai/vectorstore/oracle
- spring-ai-pgvector-store/src/main/java/org/springframework/ai/vectorstore/pgvector
- spring-ai-pinecone-store/src/main/java/org/springframework/ai/vectorstore/pinecone
- spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant
- spring-ai-redis-store/src/main/java/org/springframework/ai/vectorstore/redis
- spring-ai-typesense-store/src
- main/java/org/springframework/ai/vectorstore/typesense
- test/java/org/springframework/ai/vectorstore/typesense
- spring-ai-weaviate-store/src/main/java/org/springframework/ai/vectorstore/weaviate
22 files changed
+35
-309
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
| |||
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
84 | 103 | | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | | - | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | | - | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
Lines changed: 0 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | | - | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
71 | | - | |
72 | 68 | | |
73 | 69 | | |
74 | 70 | | |
| |||
98 | 94 | | |
99 | 95 | | |
100 | 96 | | |
101 | | - | |
102 | | - | |
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
| |||
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
125 | | - | |
126 | 119 | | |
127 | 120 | | |
128 | 121 | | |
| |||
404 | 397 | | |
405 | 398 | | |
406 | 399 | | |
407 | | - | |
408 | | - | |
409 | 400 | | |
410 | 401 | | |
411 | 402 | | |
| |||
483 | 474 | | |
484 | 475 | | |
485 | 476 | | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | 477 | | |
499 | 478 | | |
500 | 479 | | |
| |||
Lines changed: 0 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | 50 | | |
53 | 51 | | |
54 | | - | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
| |||
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
63 | | - | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
| |||
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | | - | |
114 | | - | |
115 | 109 | | |
116 | 110 | | |
117 | 111 | | |
| |||
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | | - | |
150 | 143 | | |
151 | 144 | | |
152 | 145 | | |
| |||
389 | 382 | | |
390 | 383 | | |
391 | 384 | | |
392 | | - | |
393 | | - | |
394 | 385 | | |
395 | 386 | | |
396 | 387 | | |
| |||
423 | 414 | | |
424 | 415 | | |
425 | 416 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | 417 | | |
438 | 418 | | |
439 | 419 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
222 | 220 | | |
223 | 221 | | |
224 | 222 | | |
| |||
239 | 237 | | |
240 | 238 | | |
241 | 239 | | |
242 | | - | |
243 | 240 | | |
244 | 241 | | |
245 | 242 | | |
| |||
777 | 774 | | |
778 | 775 | | |
779 | 776 | | |
780 | | - | |
781 | | - | |
782 | 777 | | |
783 | 778 | | |
784 | 779 | | |
| |||
917 | 912 | | |
918 | 913 | | |
919 | 914 | | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | 915 | | |
933 | 916 | | |
934 | 917 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
| |||
95 | 93 | | |
96 | 94 | | |
97 | 95 | | |
98 | | - | |
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
| |||
232 | 229 | | |
233 | 230 | | |
234 | 231 | | |
235 | | - | |
236 | | - | |
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
| |||
266 | 261 | | |
267 | 262 | | |
268 | 263 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | 264 | | |
282 | 265 | | |
283 | 266 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
| |||
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | | - | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
| |||
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
374 | | - | |
375 | | - | |
376 | 371 | | |
377 | 372 | | |
378 | 373 | | |
| |||
408 | 403 | | |
409 | 404 | | |
410 | 405 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | 406 | | |
424 | 407 | | |
425 | 408 | | |
| |||
0 commit comments