forked from opensearch-project/k-NN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rehaul index parameter logic, minor edits, settings change
Signed-off-by: owenhalpert <ohalpert@gmail.com>
- Loading branch information
1 parent
82a50cb
commit aef03d0
Showing
14 changed files
with
164 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/org/opensearch/knn/index/remote/RemoteFaissHNSWIndexParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.knn.index.remote; | ||
|
||
import lombok.experimental.SuperBuilder; | ||
import org.opensearch.core.xcontent.XContentBuilder; | ||
import org.opensearch.knn.common.KNNConstants; | ||
|
||
import java.io.IOException; | ||
|
||
import static org.opensearch.knn.index.remote.KNNRemoteConstants.ALGORITHM_PARAMETERS; | ||
|
||
@SuperBuilder | ||
public class RemoteFaissHNSWIndexParameters extends RemoteIndexParameters { | ||
int m; | ||
int efConstruction; | ||
int efSearch; | ||
|
||
@Override | ||
void addAlgorithmParameters(XContentBuilder builder) throws IOException { | ||
builder.startObject(ALGORITHM_PARAMETERS); | ||
builder.field(KNNConstants.METHOD_PARAMETER_M, m); | ||
builder.field(KNNConstants.METHOD_PARAMETER_EF_CONSTRUCTION, efConstruction); | ||
builder.field(KNNConstants.METHOD_PARAMETER_EF_SEARCH, efSearch); | ||
builder.endObject(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.