Conversation
| compileTestJava.dependsOn('copyNativeLib') | ||
| test.dependsOn('buildRust') | ||
| testFfi.dependsOn('buildRust') | ||
| test.dependsOn('buildRustRelease') |
There was a problem hiding this comment.
why? I thought we were okay with running tests vs the debug version?
There was a problem hiding this comment.
gradle still runs UT on release due to copyNativeLib. At least it doesn't build debug version which is never used.
There was a problem hiding this comment.
I don't know when we decided to switch to the release version. Better to run against debug, but we can fix this in a separate PR
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
| RequestType::ScriptKill => Some(get_two_word_command("SCRIPT", "KILL")), | ||
| RequestType::FtCreate => Some(cmd("FT.CREATE")), | ||
| RequestType::FtSearch => Some(cmd("FT.SEARCH")), | ||
| RequestType::FtDrop => Some(cmd("FT.DROPINDEX")), |
There was a problem hiding this comment.
| RequestType::FtDrop => Some(cmd("FT.DROPINDEX")), | |
| RequestType::FtDropIndex => Some(cmd("FT.DROPINDEX")), |
| ProtobufRequestType::ScriptShow => RequestType::ScriptShow, | ||
| ProtobufRequestType::FtCreate => RequestType::FtCreate, | ||
| ProtobufRequestType::FtSearch => RequestType::FtSearch, | ||
| ProtobufRequestType::FtDrop => RequestType::FtDrop, |
There was a problem hiding this comment.
| ProtobufRequestType::FtDrop => RequestType::FtDrop, | |
| ProtobufRequestType::FtDropIndex => RequestType::FtDropIndex, |
| ScriptShow = 218, | ||
| FtCreate = 2000, | ||
| FtSearch = 2001, | ||
| FtDrop = 2002, |
There was a problem hiding this comment.
| FtDrop = 2002, | |
| FtDropIndex = 2002, |
|
|
||
| FtCreate = 2000; | ||
| FtSearch = 2001; | ||
| FtDrop = 2002; |
There was a problem hiding this comment.
| FtDrop = 2002; | |
| FtDropIndex = 2002; |
| compileTestJava.dependsOn('copyNativeLib') | ||
| test.dependsOn('buildRust') | ||
| testFfi.dependsOn('buildRust') | ||
| test.dependsOn('buildRustRelease') |
There was a problem hiding this comment.
I don't know when we decided to switch to the release version. Better to run against debug, but we can fix this in a separate PR
| import glide.api.models.commands.vss.FTSearchOptions.FTSearchOptionsBuilder; | ||
| import java.util.concurrent.CompletableFuture; | ||
|
|
||
| public interface VectorSearchBaseCommands { |
There was a problem hiding this comment.
Please change this to a Static Public Class and put it under package glide.api.commands.servermodules.
Move the commands function from BaseClient to here (add the argument BaseClient to each command).
We don't need to separate Interface and commands, and we can put the documentation in one place.
There was a problem hiding this comment.
Following the JSON and FT commands, we should rename this class to FT, and commands should only reference the action. Example:
import static glide.api.models.commands. servermodules.FT;
FT.create(client, "hash_idx1", FTCreateOptions.empty(), new FieldInfo[] {
new FieldInfo("vec", VectorFieldFlat.builder(DistanceMetric.L2, 2).build())
}).get();
| * client.ftdrop("hash_idx1").get(); | ||
| * }</pre> | ||
| */ | ||
| CompletableFuture<String> ftdrop(String indexName); |
There was a problem hiding this comment.
| CompletableFuture<String> ftdrop(String indexName); | |
| CompletableFuture<String> ftdropindex(String indexName); |
| var args = new ArrayList<String>(); | ||
| args.add("TAG"); | ||
| if (separator.isPresent()) { | ||
| args.add("SEPARATOR"); |
There was a problem hiding this comment.
Should these keywords be constants?
| @Override | ||
| public String[] toArgs() { | ||
| var args = new ArrayList<String>(); | ||
| args.add("VECTOR"); |
There was a problem hiding this comment.
Suggestion: Types TEXT, VECTOR, TAG, etc. could be Enums.
| var args = new ArrayList<String>(); | ||
| args.add("VECTOR"); | ||
| args.add(Algorithm); | ||
| args.add(Integer.toString(params.size() * 2)); |
There was a problem hiding this comment.
There is no null check for params? This is a potential null pointer exception.
| */ | ||
| public static class VectorFieldHnsw extends VectorField { | ||
| protected VectorFieldHnsw(Map<String, String> params) { | ||
| super(params, "HNSW"); |
There was a problem hiding this comment.
"HNSW" value can be taken from Algorithm Enum.
| concatenateArrays( | ||
| new GlideString[] {gs(indexName), gs(query)}, | ||
| options.toArgs(), | ||
| new GlideString[] {gs("DIALECT"), gs("2")}); |
There was a problem hiding this comment.
I don't see this option in the inputs.
FT.CREATEFT.SEARCHFT.DROP