-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: FT.EXPLAIN and FT.EXPLAINCLI #2515
Java: FT.EXPLAIN and FT.EXPLAINCLI #2515
Conversation
Signed-off-by: Chloe <chloe.yip@improving.com>
Signed-off-by: Chloe Yip <chloe.yip@improving.com>
Signed-off-by: Chloe <chloe.yip@improving.com>
Signed-off-by: Chloe <chloe.yip@improving.com>
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Chloe <chloe.yip@improving.com>
Signed-off-by: Chloe <chloe.yip@improving.com>
Signed-off-by: Chloe <chloe.yip@improving.com>
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/integTest/src/test/java/glide/modules/VectorSearchTests.java
Outdated
Show resolved
Hide resolved
java/integTest/src/test/java/glide/modules/VectorSearchTests.java
Outdated
Show resolved
Hide resolved
java/integTest/src/test/java/glide/modules/VectorSearchTests.java
Outdated
Show resolved
Hide resolved
java/integTest/src/test/java/glide/modules/VectorSearchTests.java
Outdated
Show resolved
Hide resolved
java/integTest/src/test/java/glide/modules/VectorSearchTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Chloe <chloe.yip@improving.com>
Signed-off-by: Chloe <chloe.yip@improving.com>
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Chloe <chloe.yip@improving.com>
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
*/ | ||
public static CompletableFuture<String> explain( | ||
@NonNull BaseClient client, @NonNull String indexName, @NonNull String query) { | ||
var args = concatenateArrays(new GlideString[] {gs("FT.EXPLAIN"), gs(indexName), gs(query)}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var args = concatenateArrays(new GlideString[] {gs("FT.EXPLAIN"), gs(indexName), gs(query)}); | |
GlideString[] args = new GlideString[] {gs("FT.EXPLAIN"), gs(indexName), gs(query)}; |
concatenateArrays()
is not needed, as we are creating only one array. Also try not to use var
.
Please check all other occurences as well.
// search query that returns all data. | ||
resultGS = FT.explaincli(client, gs(indexName), gs("*")).get(); | ||
for (GlideString r : resultGS) { | ||
resultListGS2.add(r.toString().trim()); // trim to remove any excess white space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using stream again here with resultListGS2
?
} | ||
|
||
@SneakyThrows | ||
public void createIndexHelper(String indexName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a helper/utility method, then maybe it doesn't need to be public.
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, last nits
java/client/src/main/java/glide/api/commands/servermodules/FT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Issue link
This Pull Request is linked to issue (URL): #2428
Checklist
Before submitting the PR make sure the following are checked: