add key in pojo for vector result

This commit is contained in:
Jonathan Shook 2024-02-08 17:38:00 -06:00
parent 8f4aa5cec5
commit ac8ca0be37

View File

@ -65,9 +65,12 @@ public class KnnSearchOpDispenser extends BaseOpenSearchOpDispenser {
public static class Doc {
private float[] values;
private String key;
public Doc() {}
public Doc(float[] values) {
public Doc(float[] values, String key) {
this.values = values;
this.key = key;
}
public float[] getValues() {
return values;
@ -79,6 +82,14 @@ public class KnnSearchOpDispenser extends BaseOpenSearchOpDispenser {
public String toString() {
return "{" + "values=" + values + "}";
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
}