Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add tooling_skip field option to preserve manually-maintained protobuf fields ([#378](https://github.com/opensearch-project/opensearch-protobufs/pull/378))
- Test Coverage Improvements ([#380](https://github.com/opensearch-project/opensearch-protobufs/pull/380))
- Add protobuf generation documentation and remove unused BUILD dependency ([#379](https://github.com/opensearch-project/opensearch-protobufs/pull/379))
- Add support of BinaryFieldValues for non _source primitive array indexing ([#1035](https://github.com/opensearch-project/opensearch-api-specification/pull/1035))

### Changed

Expand Down
44 changes: 43 additions & 1 deletion protos/schemas/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,9 @@ message BulkRequestBody {

// [optional]
optional bytes object = 3;

// Map of fully-qualified field path -> typed value.
map<string, BinaryFieldValue> field_values = 4 [(tooling_skip) = true];
Comment on lines +891 to +892
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Map of fully-qualified field path -> typed value.
map<string, BinaryFieldValue> field_values = 4 [(tooling_skip) = true];
// EXPERIMENTAL field - may have breaking changes
// [optional] Map of fully-qualified field path -> typed value.
map<string, BinaryFieldValue> field_values = 4 [(tooling_skip) = true];

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to give us an escape hatch in case this needs any tuning :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally can you document with which operation this should be used for? (create/update/index/delete) and which fields this is not compatible with? e.g. can both object and field_values provided?

}

message OperationContainer {
Expand Down Expand Up @@ -2823,6 +2826,45 @@ message HitMatchedQueries {
}
}

message BinaryFieldValue {
oneof binary_field_value {
BytesValue bytes_value = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some comments above all the newly added fields to clarify their usage, along with the [optional] / [required] keyword to adhere to the current style in the repo?


FloatArrayValue float_array_value = 2;

}
}

message BytesValue {

bytes bytes = 1;
}

message FloatArrayValue {
oneof float_array_value {
// fast path (4 * dimension bytes, little-endian)
FloatBinaryLE binary_le = 1;

// simple path, packed array
FloatList values = 2;

}
}

message FloatBinaryLE {

bytes bytes_le = 1;

// Vector dimension
int32 dimension = 2;
}

message FloatList {

repeated float values = 1;
}


message BoostingQuery {

// 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.
Expand Down Expand Up @@ -3264,4 +3306,4 @@ message GeneralNumber {
enum NullValue {
NULL_VALUE_UNSPECIFIED = 0;
NULL_VALUE_NULL = 1;
}
}