@@ -90,6 +90,7 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
9090            mean : 0.7 , 
9191            sigma : 0.3 , 
9292          } , 
93+           binaryQuantized : false , 
9394        } , 
9495      } ; 
9596      const  task : EnqueuedTask  =  await  client 
@@ -101,6 +102,7 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
101102      const  response : Embedders  =  await  client . index ( index . uid ) . getEmbedders ( ) ; 
102103
103104      expect ( response ) . toEqual ( newEmbedder ) ; 
105+       expect ( response ) . not . toHaveProperty ( "documentTemplateMaxBytes" ) ; 
104106    } ) ; 
105107
106108    test ( `${ permission }   key: Update embedders with 'openAi' source` ,  async  ( )  =>  { 
@@ -118,6 +120,8 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
118120            sigma : 0.3 , 
119121          } , 
120122          url : "https://api.openai.com/v1/embeddings" , 
123+           documentTemplateMaxBytes : 500 , 
124+           binaryQuantized : false , 
121125        } , 
122126      } ; 
123127      const  task : EnqueuedTask  =  await  client 
@@ -147,6 +151,8 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
147151            mean : 0.7 , 
148152            sigma : 0.3 , 
149153          } , 
154+           documentTemplateMaxBytes : 500 , 
155+           binaryQuantized : false , 
150156        } , 
151157      } ; 
152158      const  task : EnqueuedTask  =  await  client 
@@ -188,6 +194,8 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
188194          headers : { 
189195            "Custom-Header" : "CustomValue" , 
190196          } , 
197+           documentTemplateMaxBytes : 500 , 
198+           binaryQuantized : false , 
191199        } , 
192200      } ; 
193201      const  task : EnqueuedTask  =  await  client 
@@ -219,6 +227,8 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
219227            sigma : 0.3 , 
220228          } , 
221229          dimensions : 512 , 
230+           documentTemplateMaxBytes : 500 , 
231+           binaryQuantized : false , 
222232        } , 
223233      } ; 
224234      const  task : EnqueuedTask  =  await  client 
@@ -266,6 +276,58 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
266276      expect ( response ) . toEqual ( null ) ; 
267277    } ) ; 
268278
279+     test ( `${ permission }   key: search (POST) with vectors` ,  async  ( )  =>  { 
280+       const  client  =  await  getClient ( permission ) ; 
281+ 
282+       const  {  taskUid }  =  await  client . index ( index . uid ) . updateEmbedders ( { 
283+         default : { 
284+           source : "userProvided" , 
285+           dimensions : 1 , 
286+         } , 
287+       } ) ; 
288+       await  client . waitForTask ( taskUid ) ; 
289+ 
290+       const  response  =  await  client . index ( index . uid ) . search ( "" ,  { 
291+         vector : [ 1 ] , 
292+         hybrid : { 
293+           embedder : "default" , 
294+           semanticRatio : 1.0 , 
295+         } , 
296+       } ) ; 
297+ 
298+       expect ( response ) . toHaveProperty ( "hits" ) ; 
299+       expect ( response ) . toHaveProperty ( "semanticHitCount" ) ; 
300+       // Those fields are no longer returned by the search response 
301+       // We want to ensure that they don't appear in it anymore 
302+       expect ( response ) . not . toHaveProperty ( "vector" ) ; 
303+       expect ( response ) . not . toHaveProperty ( "_semanticScore" ) ; 
304+     } ) ; 
305+ 
306+     test ( `${ permission }   key: search (GET) with vectors` ,  async  ( )  =>  { 
307+       const  client  =  await  getClient ( permission ) ; 
308+ 
309+       const  {  taskUid }  =  await  client . index ( index . uid ) . updateEmbedders ( { 
310+         default : { 
311+           source : "userProvided" , 
312+           dimensions : 1 , 
313+         } , 
314+       } ) ; 
315+       await  client . waitForTask ( taskUid ) ; 
316+ 
317+       const  response  =  await  client . index ( index . uid ) . searchGet ( "" ,  { 
318+         vector : [ 1 ] , 
319+         hybridEmbedder : "default" , 
320+         hybridSemanticRatio : 1.0 , 
321+       } ) ; 
322+ 
323+       expect ( response ) . toHaveProperty ( "hits" ) ; 
324+       expect ( response ) . toHaveProperty ( "semanticHitCount" ) ; 
325+       // Those fields are no longer returned by the search response 
326+       // We want to ensure that they don't appear in it anymore 
327+       expect ( response ) . not . toHaveProperty ( "vector" ) ; 
328+       expect ( response ) . not . toHaveProperty ( "_semanticScore" ) ; 
329+     } ) ; 
330+ 
269331    test ( `${ permission }   key: search for similar documents` ,  async  ( )  =>  { 
270332      const  client  =  await  getClient ( permission ) ; 
271333
@@ -288,6 +350,7 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
288350      await  client . waitForTask ( documentAdditionTask ) ; 
289351
290352      const  response  =  await  client . index ( index . uid ) . searchSimilarDocuments ( { 
353+         embedder : "manual" , 
291354        id : "143" , 
292355      } ) ; 
293356
0 commit comments