Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SearchRequest/Response proto and schema proto #15411

Open
wants to merge 3 commits into
base: 2.16
Choose a base branch
from
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
61 changes: 61 additions & 0 deletions server/src/main/proto/server/common/common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
syntax = "proto3";

package org.opensearch.common.proto;
option java_multiple_files = true;
option java_outer_classname = "CommonProto";

message IntArray{
repeated int32 values = 1;
}

message LongArray{
repeated int64 values = 1;
}

message FloatArray{
repeated float values = 1;
}

message DoubleArray{
repeated double values = 1;
}

message StringArray{
repeated string values = 1;
}

message BytesArray{
repeated bytes values = 1;
}

message BoolArray{
repeated bool values = 1;
}

/**
FieldValue:
description: A field value.
type:
- boolean
- 'null'
- number
- object
- string
*/
message MultiTypeValue{
oneof value{
GeneralNumber number = 1;
string string_value = 2;
bytes bytes_value = 3;
bool bool_value = 4;
}
}

message GeneralNumber {
oneof value{
int32 int_value = 1;
int64 long_value = 2;
float float_value = 3;
double double_value = 4;
}
}
60 changes: 60 additions & 0 deletions server/src/main/proto/server/search/aggregation_breakdown.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
Schemas of _core.search category

Schemas of _core.search category

The version of the OpenAPI document: 1.0.0

Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package org.opensearch.search.proto;
option java_multiple_files = true;



message AggregationBreakdown {

float build_aggregation = 1;

float build_aggregation_count = 2;

float build_leaf_collector = 3;

float build_leaf_collector_count = 4;

float collect = 5;

float collect_count = 6;

float initialize = 7;

float initialize_count = 8;

float post_collection = 9;

float post_collection_count = 10;

float reduce = 11;

float reduce_count = 12;

}
43 changes: 43 additions & 0 deletions server/src/main/proto/server/search/aggregation_profile.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
Schemas of _core.search category

Schemas of _core.search category

The version of the OpenAPI document: 1.0.0

Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package org.opensearch.search.proto;
option java_multiple_files = true;


import "server/search/aggregation_breakdown.proto";
import "server/search/aggregation_profile_debug.proto";

message AggregationProfile {

AggregationBreakdown breakdown = 286857698;

string description = 113933319;

// Time unit for nanoseconds
float time_in_nanos = 94097879;

string type = 3575610;

AggregationProfileDebug debug = 95458899;

repeated AggregationProfile children = 48913922;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
Schemas of _core.search category

Schemas of _core.search category

The version of the OpenAPI document: 1.0.0

Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package org.opensearch.search.proto;
option java_multiple_files = true;


import "server/search/aggregation_profile_delegate_debug_filter.proto";

message AggregationProfileDebug {

float segments_with_multi_valued_ords = 175102879;

string collection_strategy = 208226316;

float segments_with_single_valued_ords = 242809759;

float total_buckets = 138939957;

float built_buckets = 64814330;

string result_strategy = 84288173;

bool has_filter = 191100096;

string delegate = 282451334;

AggregationProfileDebug delegate_debug = 27647772;

float chars_fetched = 505847418;

float extract_count = 278565935;

float extract_ns = 214678084;

float values_fetched = 373640892;

float collect_analyzed_ns = 371454153;

float collect_analyzed_count = 519275104;

float surviving_buckets = 510424761;

float ordinals_collectors_used = 276182857;

float ordinals_collectors_overhead_too_high = 528686757;

float string_hashing_collectors_used = 344532608;

float numeric_collectors_used = 290973279;

float empty_collectors_used = 267779101;

repeated string deferred_aggregators = 268219033;

float segments_with_doc_count_field = 303272184;

float segments_with_deleted_docs = 312342887;

repeated AggregationProfileDelegateDebugFilter filters = 317676550;

float segments_counted = 186950737;

float segments_collected = 339150187;

string map_reducer = 531896345;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
Schemas of _core.search category

Schemas of _core.search category

The version of the OpenAPI document: 1.0.0

Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package org.opensearch.search.proto;
option java_multiple_files = true;



message AggregationProfileDelegateDebugFilter {

float results_from_metadata = 132154472;

string query = 107944136;

string specialized_for = 208110253;

float segments_counted_in_constant_time = 474566367;

}
37 changes: 37 additions & 0 deletions server/src/main/proto/server/search/collector.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
Schemas of _core.search category

Schemas of _core.search category

The version of the OpenAPI document: 1.0.0

Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package org.opensearch.search.proto;
option java_multiple_files = true;



message Collector {

string name = 3373707;

string reason = 398093757;

// Time unit for nanoseconds
float time_in_nanos = 94097879;

repeated Collector children = 48913922;

}
31 changes: 31 additions & 0 deletions server/src/main/proto/server/search/date_decay_function.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
Schemas of _common.query_dsl category

Schemas of _common.query_dsl category

The version of the OpenAPI document: 1.0.0

Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package org.opensearch.search.proto;
option java_multiple_files = true;


// TODO

message DateDecayFunction {

// MultiValueMode multi_value_mode = 466997881;

}
Loading
Loading