@@ -63,8 +63,6 @@ def vector_store_custom(self, mock_search_client, mock_index_client):
6363 vector_store_schema_config = VectorStoreSchemaConfig (
6464 index_name = "test_vectors" ,
6565 id_field = "id_custom" ,
66- text_field = "text_custom" ,
67- attributes_field = "attributes_custom" ,
6866 vector_field = "vector_custom" ,
6967 vector_size = 5 ,
7068 ),
@@ -86,15 +84,11 @@ def sample_documents(self):
8684 return [
8785 VectorStoreDocument (
8886 id = "doc1" ,
89- text = "This is document 1" ,
9087 vector = [0.1 , 0.2 , 0.3 , 0.4 , 0.5 ],
91- attributes = {"title" : "Doc 1" , "category" : "test" },
9288 ),
9389 VectorStoreDocument (
9490 id = "doc2" ,
95- text = "This is document 2" ,
9691 vector = [0.2 , 0.3 , 0.4 , 0.5 , 0.6 ],
97- attributes = {"title" : "Doc 2" , "category" : "test" },
9892 ),
9993 ]
10094
@@ -110,26 +104,20 @@ async def test_vector_store_operations(
110104 search_results = [
111105 {
112106 "id" : "doc1" ,
113- "text" : "This is document 1" ,
114107 "vector" : [0.1 , 0.2 , 0.3 , 0.4 , 0.5 ],
115- "attributes" : '{"title": "Doc 1", "category": "test"}' ,
116108 "@search.score" : 0.9 ,
117109 },
118110 {
119111 "id" : "doc2" ,
120- "text" : "This is document 2" ,
121112 "vector" : [0.2 , 0.3 , 0.4 , 0.5 , 0.6 ],
122- "attributes" : '{"title": "Doc 2", "category": "test"}' ,
123113 "@search.score" : 0.8 ,
124114 },
125115 ]
126116 mock_search_client .search .return_value = search_results
127117
128118 mock_search_client .get_document .return_value = {
129119 "id" : "doc1" ,
130- "text" : "This is document 1" ,
131120 "vector" : [0.1 , 0.2 , 0.3 , 0.4 , 0.5 ],
132- "attributes" : '{"title": "Doc 1", "category": "test"}' ,
133121 }
134122
135123 vector_store .load_documents (sample_documents )
@@ -154,8 +142,6 @@ def mock_embedder(text: str) -> list[float]:
154142
155143 doc = vector_store .search_by_id ("doc1" )
156144 assert doc .id == "doc1"
157- assert doc .text == "This is document 1"
158- assert doc .attributes ["title" ] == "Doc 1"
159145
160146 async def test_empty_embedding (self , vector_store , mock_search_client ):
161147 """Test similarity search by text with empty embedding."""
@@ -186,26 +172,20 @@ async def test_vector_store_customization(
186172 search_results = [
187173 {
188174 vector_store_custom .id_field : "doc1" ,
189- vector_store_custom .text_field : "This is document 1" ,
190175 vector_store_custom .vector_field : [0.1 , 0.2 , 0.3 , 0.4 , 0.5 ],
191- vector_store_custom .attributes_field : '{"title": "Doc 1", "category": "test"}' ,
192176 "@search.score" : 0.9 ,
193177 },
194178 {
195179 vector_store_custom .id_field : "doc2" ,
196- vector_store_custom .text_field : "This is document 2" ,
197180 vector_store_custom .vector_field : [0.2 , 0.3 , 0.4 , 0.5 , 0.6 ],
198- vector_store_custom .attributes_field : '{"title": "Doc 2", "category": "test"}' ,
199181 "@search.score" : 0.8 ,
200182 },
201183 ]
202184 mock_search_client .search .return_value = search_results
203185
204186 mock_search_client .get_document .return_value = {
205187 vector_store_custom .id_field : "doc1" ,
206- vector_store_custom .text_field : "This is document 1" ,
207188 vector_store_custom .vector_field : [0.1 , 0.2 , 0.3 , 0.4 , 0.5 ],
208- vector_store_custom .attributes_field : '{"title": "Doc 1", "category": "test"}' ,
209189 }
210190
211191 vector_store_custom .load_documents (sample_documents )
@@ -230,5 +210,3 @@ def mock_embedder(text: str) -> list[float]:
230210
231211 doc = vector_store_custom .search_by_id ("doc1" )
232212 assert doc .id == "doc1"
233- assert doc .text == "This is document 1"
234- assert doc .attributes ["title" ] == "Doc 1"
0 commit comments