Skip to content

Commit 6c988cf

Browse files
committed
chore: document addVector
1 parent e3fd2cc commit 6c988cf

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/collections/config/index.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ const config = <T>(
4040
.withClassName(name)
4141
.withProperty(resolveProperty<any>(property, []))
4242
.do()
43-
.then(() => {}),
43+
.then(() => { }),
4444
addReference: (
4545
reference: ReferenceSingleTargetConfigCreate<any> | ReferenceMultiTargetConfigCreate<any>
4646
) =>
4747
new PropertyCreator(connection)
4848
.withClassName(name)
4949
.withProperty(resolveReference<any>(reference))
5050
.do()
51-
.then(() => {}),
51+
.then(() => { }),
5252
addVector: async (vectors: VectorizersConfigAdd<T>) => {
5353
const supportsDynamicVectorIndex = await dbVersionSupport.supportsDynamicVectorIndex();
5454
const { vectorsConfig } = makeVectorsConfig(vectors, supportsDynamicVectorIndex);
@@ -72,7 +72,7 @@ const config = <T>(
7272
})
7373
);
7474
},
75-
updateShards: async function (status: 'READY' | 'READONLY', names?: string | string[]) {
75+
updateShards: async function(status: 'READY' | 'READONLY', names?: string | string[]) {
7676
let shardNames: string[];
7777
if (names === undefined) {
7878
shardNames = await this.getShards().then((shards) => shards.map((s) => s.name));
@@ -97,7 +97,7 @@ const config = <T>(
9797
)
9898
)
9999
.then((merged) => new ClassUpdater(connection).withClass(merged).do())
100-
.then(() => {});
100+
.then(() => { });
101101
},
102102
};
103103
};
@@ -121,6 +121,16 @@ export interface Config<T> {
121121
addReference: (
122122
reference: ReferenceSingleTargetConfigCreate<T> | ReferenceMultiTargetConfigCreate<T>
123123
) => Promise<void>;
124+
/**
125+
* Add one or more named vectors to the collection in Weaviate.
126+
* Named vectors can be added to collections with existing named vectors only.
127+
*
128+
* Existing named vectors are immutable in Weaviate. The client will not include
129+
* any of those in the request.
130+
*
131+
* @param {VectorizersConfigAdd<any>} vectors Vector configurations.
132+
* @returns {Promise<void>} A promise that resolves when the named vector has been created.
133+
*/
124134
addVector: (vectors: VectorizersConfigAdd<T>) => Promise<void>;
125135
/**
126136
* Get the configuration for this collection from Weaviate.

0 commit comments

Comments
 (0)