Skip to content

Commit dd16472

Browse files
committed
fix(tokenize): rename the other overloaded method
1 parent 49faf26 commit dd16472

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/it/java/io/weaviate/integration/TokenizeITest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public void testTokenize() throws Exception {
2929
var sentence = "hello world";
3030

3131
// Act
32-
var custom = client.tokenize.forProperty(sentence,
32+
var custom = client.tokenize.text(sentence,
3333
tok -> tok.tokenization(Tokenization.TRIGRAM));
3434

35-
var existing = client.tokenize.text(sentence,
35+
var existing = client.tokenize.forProperty(sentence,
3636
nsWords, "sentence");
3737

3838
// Assert

‎src/main/java/io/weaviate/client6/v1/api/tokenize/WeaviateTokenizeClient.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public WeaviateTokenizeClient(RestTransport restTransport) {
2626
* due to a malformed request, a networking error
2727
* or the server being unavailable.
2828
*/
29-
public TokenizeResponse text(String text, String collection, String property) throws IOException {
29+
public TokenizeResponse forProperty(String text, String collection, String property) throws IOException {
3030
return text(new TokenizeRequest(text, collection, property));
3131
}
3232

@@ -41,7 +41,7 @@ public TokenizeResponse text(String text, String collection, String property) th
4141
* due to a malformed request, a networking error
4242
* or the server being unavailable.
4343
*/
44-
public TokenizeResponse forProperty(String text, Function<TokenizeRequest.Builder, ObjectBuilder<TokenizeRequest>> fn)
44+
public TokenizeResponse text(String text, Function<TokenizeRequest.Builder, ObjectBuilder<TokenizeRequest>> fn)
4545
throws IOException {
4646
return text(TokenizeRequest.of(text, fn));
4747
}

‎src/main/java/io/weaviate/client6/v1/api/tokenize/WeaviateTokenizeClientAsync.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public WeaviateTokenizeClientAsync(RestTransport restTransport) {
2020
* @param collection Name of the reference collection.
2121
* @param property Name of the property to source tokenization config from.
2222
*/
23-
public CompletableFuture<TokenizeResponse> text(String text, String collection, String property) {
23+
public CompletableFuture<TokenizeResponse> forProperty(String text, String collection, String property) {
2424
return text(new TokenizeRequest(text, collection, property));
2525
}
2626

@@ -30,7 +30,7 @@ public CompletableFuture<TokenizeResponse> text(String text, String collection,
3030
* @param text Input text string.
3131
* @param fn Lambda expression for optional tokenization parameters.
3232
*/
33-
public CompletableFuture<TokenizeResponse> forProperty(String text,
33+
public CompletableFuture<TokenizeResponse> text(String text,
3434
Function<TokenizeRequest.Builder, ObjectBuilder<TokenizeRequest>> fn) {
3535
return text(TokenizeRequest.of(text, fn));
3636
}

0 commit comments

Comments
 (0)