@@ -27,7 +27,7 @@ describe('Testing of the collection.query methods with a simple collection', ()
2727
2828 beforeAll ( async ( ) => {
2929 client = await weaviate . connectToLocal ( ) ;
30- collection = client . collections . get ( collectionName ) ;
30+ collection = client . collections . use ( collectionName ) ;
3131 id = await client . collections
3232 . create ( {
3333 name : collectionName ,
@@ -111,7 +111,7 @@ describe('Testing of the collection.query methods with a simple collection', ()
111111 } ) ;
112112
113113 it ( 'should query with bm25 and weighted query properties with a non-generic collection' , async ( ) => {
114- const ret = await client . collections . get ( collectionName ) . query . bm25 ( 'carrot' , {
114+ const ret = await client . collections . use ( collectionName ) . query . bm25 ( 'carrot' , {
115115 queryProperties : [
116116 {
117117 name : 'testProp' ,
@@ -230,7 +230,7 @@ describe('Testing of the collection.query methods with a collection with a refer
230230
231231 beforeAll ( async ( ) => {
232232 client = await weaviate . connectToLocal ( ) ;
233- collection = client . collections . get ( collectionName ) ;
233+ collection = client . collections . use ( collectionName ) ;
234234 return client . collections
235235 . create ( {
236236 name : collectionName ,
@@ -270,7 +270,7 @@ describe('Testing of the collection.query methods with a collection with a refer
270270
271271 describe ( 'using a non-generic collection' , ( ) => {
272272 it ( 'should query without searching returning the referenced object' , async ( ) => {
273- const ret = await client . collections . get ( collectionName ) . query . fetchObjects ( {
273+ const ret = await client . collections . use ( collectionName ) . query . fetchObjects ( {
274274 returnProperties : [ 'testProp' ] ,
275275 returnReferences : [
276276 {
@@ -450,7 +450,7 @@ describe('Testing of the collection.query methods with a collection with a neste
450450
451451 beforeAll ( async ( ) => {
452452 client = await weaviate . connectToLocal ( ) ;
453- collection = client . collections . get ( collectionName ) ;
453+ collection = client . collections . use ( collectionName ) ;
454454 return client . collections
455455 . create < TestCollectionQueryWithNestedProps > ( {
456456 name : collectionName ,
@@ -575,7 +575,7 @@ describe('Testing of the collection.query methods with a collection with a multi
575575
576576 beforeAll ( async ( ) => {
577577 client = await weaviate . connectToLocal ( ) ;
578- collection = client . collections . get ( collectionName ) ;
578+ collection = client . collections . use ( collectionName ) ;
579579 const query = ( ) =>
580580 client . collections
581581 . create < TestCollectionQueryWithMultiVector > ( {
@@ -1085,7 +1085,7 @@ describe('Testing of the groupBy collection.query methods with a simple collecti
10851085
10861086 beforeAll ( async ( ) => {
10871087 client = await weaviate . connectToLocal ( ) ;
1088- collection = client . collections . get ( collectionName ) ;
1088+ collection = client . collections . use ( collectionName ) ;
10891089 id = await client . collections
10901090 . create ( {
10911091 name : collectionName ,
@@ -1207,7 +1207,7 @@ describe('Testing of the groupBy collection.query methods with a simple collecti
12071207 } ) ;
12081208
12091209 it ( 'should groupBy with nearVector and a non-generic collection' , async ( ) => {
1210- const ret = await client . collections . get ( collectionName ) . query . nearVector ( vector , {
1210+ const ret = await client . collections . use ( collectionName ) . query . nearVector ( vector , {
12111211 groupBy : {
12121212 numberOfGroups : 1 ,
12131213 objectsPerGroup : 1 ,
@@ -1246,7 +1246,7 @@ describe('Testing of the collection.query methods with a multi-tenancy collectio
12461246
12471247 beforeAll ( async ( ) => {
12481248 client = await weaviate . connectToLocal ( ) ;
1249- collection = client . collections . get ( collectionName ) ;
1249+ collection = client . collections . use ( collectionName ) ;
12501250 [ id1 , id2 ] = await client . collections
12511251 . create < TestCollectionMultiTenancy > ( {
12521252 name : collectionName ,
@@ -1394,7 +1394,7 @@ describe('Testing of the collection.query methods with a multi-tenancy collectio
13941394// 'X-OpenAI-Api-Key': process.env.OPENAI_APIKEY as string,
13951395// },
13961396// });
1397- // collection = client.collections.get (collectionName);
1397+ // collection = client.collections.use (collectionName);
13981398// [id1, id2] = await client.collections
13991399// .create({
14001400// name: collectionName,
0 commit comments