Commit 3618524
OpenSearch: omit explicit IDs when manageDocumentIds=false; add unit/ITs; AWS Serverless compat.
- Update OpenSearchVectorStore#doAdd to omit explicit document IDs when manageDocumentIds=false, enabling AWS OpenSearch Serverless compatibility
- Add unit tests for document ID management logic in doAdd
- Add integration tests covering explicit/non-explicit ID modes and delete-by-ID behavior
Closes gh-3818
Signed-off-by: sanghun <vitash1215@gmail.com>
Set manageDocumentIds default to true for backward compatibility
The manageDocumentIds flag was initially set to false, which would
break existing users who rely on explicit document ID management.
This change sets the default to true to preserve the current behavior
for all existing OpenSearch users.
AWS OpenSearch Serverless users can explicitly opt-in by setting
manageDocumentIds(false) when they need auto-generated IDs due to
the platform's restrictions on custom document IDs.
This ensures backward compatibility while still providing the
flexibility needed for AWS Serverless environments.
Related: gh-3818
Signed-off-by: sanghun <vitash1215@gmail.com>
Fix Checkstyle violations in OpenSearchVectorStoreTest
Resolved 14 Checkstyle errors that blocked the build process:
- Corrected import statement ordering
- Added 'this.' qualifier to instance variable references
- Added missing newline at end of file
This ensures compliance with Spring AI coding standards and enables
successful compilation after rebasing onto upstream/main.
Signed-off-by: sanghun <vitash1215@gmail.com>
OpenSearch: omit explicit IDs when manageDocumentIds=false; add unit/ITs; AWS Serverless compat.
- Update OpenSearchVectorStore#doAdd to omit explicit document IDs when manageDocumentIds=false, enabling AWS OpenSearch Serverless compatibility
- Add unit tests for document ID management logic in doAdd
- Add integration tests covering explicit/non-explicit ID modes and delete-by-ID behavior
Closes gh-3818
Set manageDocumentIds default to true for backward compatibility
AWS OpenSearch Serverless users can explicitly opt-in by setting
manageDocumentIds(false) when they need auto-generated IDs due to
the platform's restrictions on custom document IDs.
This ensures backward compatibility while still providing the
flexibility needed for AWS Serverless environments.
Related: gh-3818
Signed-off-by: sanghun <vitash1215@gmail.com>1 parent 0d89fb9 commit 3618524
File tree
3 files changed
+414
-2
lines changed- vector-stores/spring-ai-opensearch-store/src
- main/java/org/springframework/ai/vectorstore/opensearch
- test/java/org/springframework/ai/vectorstore/opensearch
3 files changed
+414
-2
lines changedLines changed: 53 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| 150 | + | |
140 | 151 | | |
141 | 152 | | |
142 | 153 | | |
| |||
174 | 185 | | |
175 | 186 | | |
176 | 187 | | |
| 188 | + | |
| 189 | + | |
177 | 190 | | |
178 | 191 | | |
179 | 192 | | |
| |||
193 | 206 | | |
194 | 207 | | |
195 | 208 | | |
| 209 | + | |
196 | 210 | | |
197 | 211 | | |
198 | 212 | | |
| |||
216 | 230 | | |
217 | 231 | | |
218 | 232 | | |
219 | | - | |
220 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
221 | 243 | | |
222 | 244 | | |
223 | 245 | | |
224 | 246 | | |
225 | 247 | | |
226 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
227 | 254 | | |
228 | 255 | | |
229 | 256 | | |
| |||
481 | 508 | | |
482 | 509 | | |
483 | 510 | | |
| 511 | + | |
| 512 | + | |
484 | 513 | | |
485 | 514 | | |
486 | 515 | | |
| |||
585 | 614 | | |
586 | 615 | | |
587 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
588 | 639 | | |
589 | 640 | | |
590 | 641 | | |
| |||
Lines changed: 155 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
813 | 968 | | |
814 | 969 | | |
815 | 970 | | |
| |||
0 commit comments