Skip to content

Commit

Permalink
Fix FieldInfo Parameters Mismatch
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Tatikonda <[email protected]>
  • Loading branch information
naveentatikonda committed Feb 21, 2024
1 parent ab9991e commit be8a1ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Documentation
### Maintenance
* Bump faiss lib commit to 32f0e8cf92cd2275b60364517bb1cce67aa29a55 [#1443](https://github.com/opensearch-project/k-NN/pull/1443)
* Fix FieldInfo Parameters Mismatch [#1489](https://github.com/opensearch-project/k-NN/pull/1489)
### Refactoring
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public static class FieldInfoBuilder {
private int vectorDimension;
private VectorSimilarityFunction vectorSimilarityFunction;
private boolean softDeletes;
private boolean isParentField;

public static FieldInfoBuilder builder(String fieldName) {
return new FieldInfoBuilder(fieldName);
Expand All @@ -92,6 +93,7 @@ private FieldInfoBuilder(String fieldName) {
this.vectorDimension = 0;
this.vectorSimilarityFunction = VectorSimilarityFunction.EUCLIDEAN;
this.softDeletes = false;
this.isParentField = false;
}

public FieldInfoBuilder fieldNumber(int fieldNumber) {
Expand Down Expand Up @@ -164,6 +166,11 @@ public FieldInfoBuilder softDeletes(boolean softDeletes) {
return this;
}

public FieldInfoBuilder isParentField(boolean isParentField) {
this.isParentField = isParentField;
return this;
}

public FieldInfo build() {
return new FieldInfo(
fieldName,
Expand All @@ -181,7 +188,8 @@ public FieldInfo build() {
vectorDimension,
VectorEncoding.FLOAT32,
vectorSimilarityFunction,
softDeletes
softDeletes,
isParentField
);
}
}
Expand Down

0 comments on commit be8a1ba

Please sign in to comment.