Commit 9844a18
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 6a53268 commit 9844a18
File tree
22 files changed
+35
-292
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
-292
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 & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
100 | | - | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
120 | 117 | | |
121 | 118 | | |
122 | 119 | | |
123 | | - | |
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
| |||
404 | 400 | | |
405 | 401 | | |
406 | 402 | | |
407 | | - | |
408 | | - | |
409 | 403 | | |
410 | 404 | | |
411 | 405 | | |
| |||
Lines changed: 0 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
| |||
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
111 | | - | |
112 | | - | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
| |||
144 | 140 | | |
145 | 141 | | |
146 | 142 | | |
147 | | - | |
148 | 143 | | |
149 | 144 | | |
150 | 145 | | |
| |||
387 | 382 | | |
388 | 383 | | |
389 | 384 | | |
390 | | - | |
391 | | - | |
392 | 385 | | |
393 | 386 | | |
394 | 387 | | |
| |||
421 | 414 | | |
422 | 415 | | |
423 | 416 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | 417 | | |
436 | 418 | | |
437 | 419 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | 218 | | |
221 | 219 | | |
222 | 220 | | |
| |||
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
240 | | - | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
| |||
775 | 772 | | |
776 | 773 | | |
777 | 774 | | |
778 | | - | |
779 | | - | |
780 | 775 | | |
781 | 776 | | |
782 | 777 | | |
| |||
915 | 910 | | |
916 | 911 | | |
917 | 912 | | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | 913 | | |
931 | 914 | | |
932 | 915 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
96 | | - | |
97 | 94 | | |
98 | 95 | | |
99 | 96 | | |
| |||
230 | 227 | | |
231 | 228 | | |
232 | 229 | | |
233 | | - | |
234 | | - | |
235 | 230 | | |
236 | 231 | | |
237 | 232 | | |
| |||
264 | 259 | | |
265 | 260 | | |
266 | 261 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | 262 | | |
280 | 263 | | |
281 | 264 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
| |||
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
175 | | - | |
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
| |||
369 | 366 | | |
370 | 367 | | |
371 | 368 | | |
372 | | - | |
373 | | - | |
374 | 369 | | |
375 | 370 | | |
376 | 371 | | |
| |||
406 | 401 | | |
407 | 402 | | |
408 | 403 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | 404 | | |
422 | 405 | | |
423 | 406 | | |
| |||
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
| |||
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | | - | |
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
| |||
584 | 581 | | |
585 | 582 | | |
586 | 583 | | |
587 | | - | |
588 | | - | |
589 | 584 | | |
590 | 585 | | |
591 | 586 | | |
| |||
708 | 703 | | |
709 | 704 | | |
710 | 705 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | 706 | | |
724 | 707 | | |
725 | 708 | | |
| |||
0 commit comments