Skip to content

Commit 121424b

Browse files
laminelamLamine Idjeraouilucy66hw
authored
Add support of BinaryFieldValues for non _source primitive array indexing (opensearch-project#434)
* add support for BinaryFieldValue (extra fields values) Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * changelog Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> --------- Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> Signed-off-by: Xi Lu <fridalu66@gmail.com> Co-authored-by: Lamine Idjeraoui <lidjeraoui@apple.com> Co-authored-by: Xi Lu <fridalu66@gmail.com>
1 parent defa65a commit 121424b

2 files changed

Lines changed: 59 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1111
- Change vendorExtension protobuf type handling to use protobuf type instead of openApi type ([#409](https://github.com/opensearch-project/opensearch-protobufs/pull/409))
1212
- Normalize mixed oneOf patterns ([#416](https://github.com/opensearch-project/opensearch-protobufs/pull/416))
1313
- Add normalizeAnyOfInAllOf transformation to prevent protobuf generator from flattening allOf+anyOf structures ([#425](https://github.com/opensearch-project/opensearch-protobufs/pull/425))
14+
- Add support of BinaryFieldValue for non _source primitive array indexing ([#434](https://github.com/opensearch-project/opensearch-protobufs/pull/434))
1415
- Updated deduplicateOneOfWithArrayType to preserve oneOf variants when they have different title attributes ([#436](https://github.com/opensearch-project/opensearch-protobufs/pull/436))
1516
### Removed
1617

protos/schemas/common.proto

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,18 @@ message BulkRequestBody {
897897

898898
// [optional]
899899
optional bytes object = 3;
900+
901+
// EXPERIMENTAL field
902+
// [optional] Map of fully-qualified field path -> typed value.
903+
// This field is intended for large field values, such as large vectors, that
904+
// should be provided separately from `_source`.
905+
// Supported operations: index, create and update
906+
// Compatibility:
907+
// - May be provided together with `object`and update_action.
908+
// - `object` and `update_action` continue to represent `_source`.
909+
// - `extra_field_values` provides additional out-of-band field values and does
910+
// not replace `_source`.
911+
map<string, BinaryFieldValue> extra_field_values = 4 [(tooling_skip) = true];
900912
}
901913

902914
message OperationContainer {
@@ -2836,6 +2848,51 @@ message HitMatchedQueries {
28362848
}
28372849
}
28382850

2851+
message BinaryFieldValue {
2852+
oneof binary_field_value {
2853+
2854+
// [optional] Raw bytes payload for a field-specific binary representation.
2855+
BytesValue bytes_value = 1;
2856+
2857+
// [optional] Float array payload for fields that support vector-like input.
2858+
FloatArrayValue float_array_value = 2;
2859+
2860+
}
2861+
}
2862+
2863+
message BytesValue {
2864+
2865+
// [required] Raw bytes for the field value.
2866+
bytes bytes = 1;
2867+
}
2868+
2869+
message FloatArrayValue {
2870+
oneof encoding {
2871+
2872+
// [optional] Fast path: 4 * dimension bytes, little-endian binary float array.
2873+
FloatBinaryLE binary_le = 1;
2874+
2875+
// [optional] Simple path: packed array
2876+
FloatList values = 2;
2877+
}
2878+
}
2879+
2880+
message FloatBinaryLE {
2881+
2882+
// [required] Raw float data encoded as little-endian IEEE-754 float32 values.
2883+
bytes bytes_le = 1;
2884+
2885+
// [required] Number of float elements in the payload.
2886+
int32 dimension = 2;
2887+
}
2888+
2889+
message FloatList {
2890+
2891+
// [required] Float values for the field.
2892+
repeated float values = 1;
2893+
}
2894+
2895+
28392896
message BoostingQuery {
28402897

28412898
// Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
@@ -3296,4 +3353,4 @@ message GeneralNumber {
32963353
enum NullValue {
32973354
NULL_VALUE_UNSPECIFIED = 0;
32983355
NULL_VALUE_NULL = 1;
3299-
}
3356+
}

0 commit comments

Comments
 (0)