Skip to content

Commit

Permalink
Issue 424: Add support for handling of vector fields. Signed-off-by: …
Browse files Browse the repository at this point in the history
…Dmitry Goldenberg <[email protected]>

Signed-off-by: Dmitry Goldenberg <[email protected]>
  • Loading branch information
dgoldenberg-ias committed Jul 23, 2024
1 parent 52b5302 commit 02fae97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public Object createArray(FieldType type) {
case HALF_FLOAT:
case SCALED_FLOAT:
case FLOAT:
case KNN_VECTOR:
arrayType = FloatWritable.class;
break;
case DOUBLE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public enum FieldType {
CAST_HIERARCHY.put(TEXT, new LinkedHashSet<FieldType>(Collections.singletonList(KEYWORD)));
CAST_HIERARCHY.put(KEYWORD, new LinkedHashSet<FieldType>());
CAST_HIERARCHY.put(WILDCARD, new LinkedHashSet<FieldType>(Collections.singletonList(KEYWORD)));
CAST_HIERARCHY.put(HALF_FLOAT, new LinkedHashSet<FieldType>(Arrays.asList(FLOAT)));
CAST_HIERARCHY.put(HALF_FLOAT, new LinkedHashSet<FieldType>(Arrays.asList(FLOAT, DOUBLE, KEYWORD)));
CAST_HIERARCHY.put(SCALED_FLOAT, new LinkedHashSet<FieldType>(Arrays.asList(DOUBLE, KEYWORD)));
CAST_HIERARCHY.put(GEO_POINT, new LinkedHashSet<FieldType>());
Expand All @@ -102,6 +103,7 @@ public enum FieldType {
CAST_HIERARCHY.put(JOIN, new LinkedHashSet<FieldType>());
CAST_HIERARCHY.put(IP, new LinkedHashSet<FieldType>(Collections.singletonList(KEYWORD)));
CAST_HIERARCHY.put(COMPLETION, new LinkedHashSet<FieldType>());
CAST_HIERARCHY.put(KNN_VECTOR, new LinkedHashSet<FieldType>(Arrays.asList(FLOAT)));
}

public static FieldType parse(String name) {
Expand Down

0 comments on commit 02fae97

Please sign in to comment.