Skip to content

Commit 47b21dd

Browse files
committed
chore: rename CollectionConfig::vectors -> vectorConfig
1 parent fad240e commit 47b21dd

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/it/java/io/weaviate/integration/AggregationITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static void beforeAll() throws IOException {
3535
.properties(
3636
Property.text("category"),
3737
Property.integer("price"))
38-
.vectors(Vectorizers.selfProvided()));
38+
.vectorConfig(Vectorizers.selfProvided()));
3939

4040
var things = client.collections.use(COLLECTION);
4141
for (var category : List.of("Shoes", "Hat", "Jacket")) {

src/it/java/io/weaviate/integration/CollectionsITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void testCreateGetDelete() throws IOException {
3131
client.collections.create(collectionName,
3232
col -> col
3333
.properties(Property.text("username"), Property.integer("age"))
34-
.vectors(Vectorizers.selfProvided()));
34+
.vectorConfig(Vectorizers.selfProvided()));
3535

3636
var thingsCollection = client.collections.getConfig(collectionName);
3737

src/it/java/io/weaviate/integration/DataITest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static void createTestCollections() throws IOException {
118118
Property.integer("age"))
119119
.references(
120120
ReferenceProperty.to("hasAwards", awardsGrammy, awardsOscar))
121-
.vectors(Vectorizers.selfProvided(VECTOR_INDEX)));
121+
.vectorConfig(Vectorizers.selfProvided(VECTOR_INDEX)));
122122
}
123123

124124
@Test
@@ -234,7 +234,7 @@ public void testUpdate() throws IOException {
234234
collection -> collection
235235
.properties(Property.text("title"), Property.integer("year"))
236236
.references(ReferenceProperty.to("writtenBy", nsAuthors))
237-
.vectors(Vectorizers.selfProvided()));
237+
.vectorConfig(Vectorizers.selfProvided()));
238238

239239
var authors = client.collections.use(nsAuthors);
240240
var walter = authors.data.insert(Map.of("name", "walter scott"));

src/it/java/io/weaviate/integration/SearchITest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private static Map<String, float[]> populateTest(int n) throws IOException {
134134
private static void createTestCollection() throws IOException {
135135
client.collections.create(COLLECTION, cfg -> cfg
136136
.properties(Property.text("category"))
137-
.vectors(Vectorizers.selfProvided(VECTOR_INDEX)));
137+
.vectorConfig(Vectorizers.selfProvided(VECTOR_INDEX)));
138138
}
139139

140140
@Test
@@ -143,7 +143,7 @@ public void testNearText() throws IOException {
143143
client.collections.create(nsSongs,
144144
col -> col
145145
.properties(Property.text("title"))
146-
.vectors(Vectorizers.text2vecContextionary()));
146+
.vectorConfig(Vectorizers.text2vecContextionary()));
147147

148148
var songs = client.collections.use(nsSongs);
149149
var submarine = songs.data.insert(Map.of("title", "Yellow Submarine"));
@@ -171,7 +171,7 @@ public void testNearText_groupBy() throws IOException {
171171
client.collections.create(nsArtists,
172172
col -> col
173173
.properties(Property.text("name"))
174-
.vectors(vectorizer));
174+
.vectorConfig(vectorizer));
175175

176176
var artists = client.collections.use(nsArtists);
177177
var beatles = artists.data.insert(Map.of("name", "Beatles"));
@@ -182,7 +182,7 @@ public void testNearText_groupBy() throws IOException {
182182
col -> col
183183
.properties(Property.text("title"))
184184
.references(ReferenceProperty.to("performedBy", nsArtists))
185-
.vectors(vectorizer));
185+
.vectorConfig(vectorizer));
186186

187187
var songs = client.collections.use(nsSongs);
188188
songs.data.insert(Map.of("title", "Yellow Submarine"),
@@ -209,7 +209,7 @@ public void testNearImage() throws IOException {
209209
.properties(
210210
Property.text("breed"),
211211
Property.blob("img"))
212-
.vectors(Vectorizers.img2vecNeural(
212+
.vectorConfig(Vectorizers.img2vecNeural(
213213
i2v -> i2v.imageFields("img"))));
214214

215215
var cats = client.collections.use(nsCats);
@@ -391,7 +391,7 @@ public void testNearObject() throws IOException {
391391
client.collections.create(nsAnimals,
392392
collection -> collection
393393
.properties(Property.text("kind"))
394-
.vectors(Vectorizers.text2vecContextionary()));
394+
.vectorConfig(Vectorizers.text2vecContextionary()));
395395

396396
var animals = client.collections.use(nsAnimals);
397397

@@ -420,7 +420,7 @@ public void testHybrid() throws IOException {
420420
client.collections.create(nsHobbies,
421421
collection -> collection
422422
.properties(Property.text("name"), Property.text("description"))
423-
.vectors(Vectorizers.text2vecContextionary()));
423+
.vectorConfig(Vectorizers.text2vecContextionary()));
424424

425425
var hobbies = client.collections.use(nsHobbies);
426426

@@ -453,7 +453,7 @@ public void testBadRequest() throws IOException {
453453
client.collections.create(nsThings,
454454
collection -> collection
455455
.properties(Property.text("name"))
456-
.vectors(Vectorizers.text2vecContextionary()));
456+
.vectorConfig(Vectorizers.text2vecContextionary()));
457457

458458
var things = client.collections.use(nsThings);
459459
var balloon = things.data.insert(Map.of("name", "balloon"));
@@ -470,7 +470,7 @@ public void testBadRequest_async() throws Throwable {
470470
async.collections.create(nsThings,
471471
collection -> collection
472472
.properties(Property.text("name"))
473-
.vectors(Vectorizers.text2vecContextionary()))
473+
.vectorConfig(Vectorizers.text2vecContextionary()))
474474
.join();
475475

476476
var things = async.collections.use(nsThings);

src/main/java/io/weaviate/client6/v1/api/collections/CollectionConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public Builder edit() {
5252
.description(description)
5353
.properties(properties)
5454
.references(references)
55-
.vectors(vectors)
55+
.vectorConfig(vectors)
5656
.multiTenancy(multiTenancy)
5757
.sharding(sharding)
5858
.replication(replication)
@@ -131,13 +131,13 @@ private List<ReferenceProperty> referenceList() {
131131
return this.references.values().stream().toList();
132132
}
133133

134-
public final Builder vectors(Map<String, Vectorizer> vectors) {
134+
public final Builder vectorConfig(Map<String, Vectorizer> vectors) {
135135
this.vectors.putAll(vectors);
136136
return this;
137137
}
138138

139139
@SafeVarargs
140-
public final Builder vectors(Map.Entry<String, Vectorizer>... vectors) {
140+
public final Builder vectorConfig(Map.Entry<String, Vectorizer>... vectors) {
141141
this.vectors.putAll(Map.ofEntries(vectors));
142142
return this;
143143
}

src/main/java/io/weaviate/client6/v1/api/collections/config/UpdateCollectionRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ public Builder generativeModule(Generative generativeModule) {
9696
}
9797

9898
public final Builder vectors(Map<String, Vectorizer> vectors) {
99-
this.newCollection.vectors(vectors);
99+
this.newCollection.vectorConfig(vectors);
100100
return this;
101101
}
102102

103103
@SafeVarargs
104104
public final Builder vectors(Map.Entry<String, Vectorizer>... vectors) {
105-
this.newCollection.vectors(vectors);
105+
this.newCollection.vectorConfig(vectors);
106106
return this;
107107
}
108108

src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public static Object[][] testCases() {
230230
Property.integer("size"))
231231
.references(
232232
ReferenceProperty.to("owner", "Person", "Company"))
233-
.vectors(
233+
.vectorConfig(
234234
Vectorizers.img2vecNeural("v-shape",
235235
i2v -> i2v.imageFields("img")))),
236236
"""

0 commit comments

Comments
 (0)