@google-cloud/discoveryengine 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +147 -19
- package/build/protos/protos.d.ts +608 -126
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +185 -12
- package/build/src/v1/search_service_client.d.ts +162 -24
- package/build/src/v1/search_service_client.js +114 -17
- package/package.json +1 -1
|
@@ -38,7 +38,10 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
|
|
38
38
|
service SearchService {
|
|
39
39
|
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
|
40
40
|
option (google.api.oauth_scopes) =
|
|
41
|
-
"https://www.googleapis.com/auth/cloud-platform"
|
|
41
|
+
"https://www.googleapis.com/auth/cloud-platform,"
|
|
42
|
+
"https://www.googleapis.com/auth/discoveryengine.assist.readwrite,"
|
|
43
|
+
"https://www.googleapis.com/auth/discoveryengine.readwrite,"
|
|
44
|
+
"https://www.googleapis.com/auth/discoveryengine.serving.readwrite";
|
|
42
45
|
|
|
43
46
|
// Performs a search.
|
|
44
47
|
rpc Search(SearchRequest) returns (SearchResponse) {
|
|
@@ -91,6 +94,7 @@ service SearchService {
|
|
|
91
94
|
message SearchRequest {
|
|
92
95
|
// Specifies the image query input.
|
|
93
96
|
message ImageQuery {
|
|
97
|
+
// Specifies the image bytes.
|
|
94
98
|
oneof image {
|
|
95
99
|
// Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
|
|
96
100
|
// BMP.
|
|
@@ -129,6 +133,14 @@ message SearchRequest {
|
|
|
129
133
|
// search operators, see
|
|
130
134
|
// [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
|
|
131
135
|
string custom_search_operators = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
136
|
+
|
|
137
|
+
// Optional. The maximum number of results to retrieve from this data store.
|
|
138
|
+
// If not specified, it will use the
|
|
139
|
+
// [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1.SearchRequest.num_results_per_data_store]
|
|
140
|
+
// if provided, otherwise there is no limit. If both this field and
|
|
141
|
+
// [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1.SearchRequest.num_results_per_data_store]
|
|
142
|
+
// are specified, this field will be used.
|
|
143
|
+
int32 num_results = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
132
144
|
}
|
|
133
145
|
|
|
134
146
|
// A facet specification to perform faceted search.
|
|
@@ -737,9 +749,6 @@ message SearchRequest {
|
|
|
737
749
|
// Field names used for location-based filtering, where geolocation filters
|
|
738
750
|
// are detected in natural language search queries.
|
|
739
751
|
// Only valid when the FilterExtractionCondition is set to `ENABLED`.
|
|
740
|
-
//
|
|
741
|
-
// If this field is set, it overrides the field names set in
|
|
742
|
-
// [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1.ServingConfig.geo_search_query_detection_field_names].
|
|
743
752
|
repeated string geo_search_query_detection_field_names = 2;
|
|
744
753
|
|
|
745
754
|
// Optional. Controls behavior of how extracted filters are applied to the
|
|
@@ -769,6 +778,18 @@ message SearchRequest {
|
|
|
769
778
|
|
|
770
779
|
// Specification for search as you type in search requests.
|
|
771
780
|
message SearchAsYouTypeSpec {
|
|
781
|
+
// A schema field to be used for Search As You Type scoring on this
|
|
782
|
+
// request. Overrides any data-store-level Search As You Type field
|
|
783
|
+
// configuration for the duration of the request.
|
|
784
|
+
message Field {
|
|
785
|
+
// Required. A field key that has been indexed for Search As You Type.
|
|
786
|
+
string key = 1 [(google.api.field_behavior) = REQUIRED];
|
|
787
|
+
|
|
788
|
+
// Optional. Weight for scores from this field. Defaults to 1.0 if not
|
|
789
|
+
// specified.
|
|
790
|
+
optional double weight = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
791
|
+
}
|
|
792
|
+
|
|
772
793
|
// Enum describing under which condition search as you type should occur.
|
|
773
794
|
enum Condition {
|
|
774
795
|
// Server behavior defaults to
|
|
@@ -790,6 +811,14 @@ message SearchRequest {
|
|
|
790
811
|
// Default to
|
|
791
812
|
// [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
|
|
792
813
|
Condition condition = 1;
|
|
814
|
+
|
|
815
|
+
// Optional. The list of fields to be used for Search As You Type scoring.
|
|
816
|
+
repeated Field fields = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
817
|
+
|
|
818
|
+
// Optional. Search As You Type score threshold for filtering purpose.
|
|
819
|
+
// We keep the result if `score` >= `score_threshold`.
|
|
820
|
+
optional double score_threshold = 3
|
|
821
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
793
822
|
}
|
|
794
823
|
|
|
795
824
|
// Specifies features for display, like match highlighting.
|
|
@@ -847,10 +876,6 @@ message SearchRequest {
|
|
|
847
876
|
}
|
|
848
877
|
|
|
849
878
|
// Session specification.
|
|
850
|
-
//
|
|
851
|
-
// Multi-turn Search feature is currently at private GA stage. Please use
|
|
852
|
-
// v1alpha or v1beta version instead before we launch this feature to public
|
|
853
|
-
// GA. Or ask for allowlisting through Google Support team.
|
|
854
879
|
message SessionSpec {
|
|
855
880
|
// If set, the search result gets stored to the "turn" specified by this
|
|
856
881
|
// query ID.
|
|
@@ -889,13 +914,6 @@ message SearchRequest {
|
|
|
889
914
|
optional int32 search_result_persistence_count = 2;
|
|
890
915
|
}
|
|
891
916
|
|
|
892
|
-
// The specification for returning the document relevance score.
|
|
893
|
-
message RelevanceScoreSpec {
|
|
894
|
-
// Optional. Whether to return the relevance score for search results.
|
|
895
|
-
// The higher the score, the more relevant the document is to the query.
|
|
896
|
-
bool return_relevance_score = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
897
|
-
}
|
|
898
|
-
|
|
899
917
|
// Relevance filtering specification.
|
|
900
918
|
message RelevanceFilterSpec {
|
|
901
919
|
// Specification for relevance filtering on a specific sub-search.
|
|
@@ -921,6 +939,43 @@ message SearchRequest {
|
|
|
921
939
|
[(google.api.field_behavior) = OPTIONAL];
|
|
922
940
|
}
|
|
923
941
|
|
|
942
|
+
// The specification for returning the document relevance score.
|
|
943
|
+
message RelevanceScoreSpec {
|
|
944
|
+
// Optional. Whether to return the relevance score for search results.
|
|
945
|
+
// The higher the score, the more relevant the document is to the query.
|
|
946
|
+
bool return_relevance_score = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
// SearchAddonSpec is used to disable add-ons for search as per new
|
|
950
|
+
// repricing model. By default if the SearchAddonSpec is not specified, we
|
|
951
|
+
// consider that the customer wants to enable them wherever applicable.
|
|
952
|
+
message SearchAddonSpec {
|
|
953
|
+
// Optional. If true, semantic add-on is disabled. Semantic add-on includes
|
|
954
|
+
// embeddings and jetstream.
|
|
955
|
+
bool disable_semantic_add_on = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
956
|
+
|
|
957
|
+
// Optional. If true, disables event re-ranking and personalization to
|
|
958
|
+
// optimize KPIs & personalize results.
|
|
959
|
+
bool disable_kpi_personalization_add_on = 2
|
|
960
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
961
|
+
|
|
962
|
+
// Optional. If true, generative answer add-on is disabled. Generative
|
|
963
|
+
// answer add-on includes natural language to filters and simple answers.
|
|
964
|
+
bool disable_generative_answer_add_on = 3
|
|
965
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
// Configuration parameters for the Custom Ranking feature.
|
|
969
|
+
message CustomRankingParams {
|
|
970
|
+
// Optional. A list of ranking expressions (see `ranking_expression` for the
|
|
971
|
+
// syntax documentation) to evaluate. The evaluation results will be
|
|
972
|
+
// returned in
|
|
973
|
+
// `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
|
|
974
|
+
// field.
|
|
975
|
+
repeated string expressions_to_precompute = 1
|
|
976
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
977
|
+
}
|
|
978
|
+
|
|
924
979
|
// The backend to use for the ranking expression evaluation.
|
|
925
980
|
enum RankingExpressionBackend {
|
|
926
981
|
// Default option for unspecified/unknown values.
|
|
@@ -1060,6 +1115,13 @@ message SearchRequest {
|
|
|
1060
1115
|
// used.
|
|
1061
1116
|
repeated DataStoreSpec data_store_specs = 32;
|
|
1062
1117
|
|
|
1118
|
+
// Optional. The maximum number of results to retrieve from each data store.
|
|
1119
|
+
// If not specified, it will use the
|
|
1120
|
+
// [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.num_results]
|
|
1121
|
+
// if provided, otherwise there is no limit.
|
|
1122
|
+
int32 num_results_per_data_store = 65
|
|
1123
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1124
|
+
|
|
1063
1125
|
// The filter syntax consists of an expression language for constructing a
|
|
1064
1126
|
// predicate from one or more fields of the documents being filtered. Filter
|
|
1065
1127
|
// expression is case-sensitive.
|
|
@@ -1263,6 +1325,15 @@ message SearchRequest {
|
|
|
1263
1325
|
// Google model to determine the keyword-based overlap between the query and
|
|
1264
1326
|
// the document.
|
|
1265
1327
|
// * `base_rank`: the default rank of the result
|
|
1328
|
+
// * `media_actor_match`: whether the media actor matches the query
|
|
1329
|
+
// * `media_director_match`: whether the media director matches the query
|
|
1330
|
+
// * `media_genre_match`: whether the media genre matches the query
|
|
1331
|
+
// * `media_language_match`: whether the media language matches the query
|
|
1332
|
+
// * `media_title_match`: whether the media title matches the query
|
|
1333
|
+
// * `media_prefix_similarity_rank`: prefix similarity rank for media
|
|
1334
|
+
// results
|
|
1335
|
+
// * `media_semantic_similarity_rank`: semantic similarity rank for media
|
|
1336
|
+
// results
|
|
1266
1337
|
string ranking_expression = 26 [(google.api.field_behavior) = OPTIONAL];
|
|
1267
1338
|
|
|
1268
1339
|
// Optional. The backend to use for the ranking expression evaluation.
|
|
@@ -1339,10 +1410,6 @@ message SearchRequest {
|
|
|
1339
1410
|
// Call /answer API with the session ID generated in the first call.
|
|
1340
1411
|
// Here, the answer generation happens in the context of the search
|
|
1341
1412
|
// results from the first search call.
|
|
1342
|
-
//
|
|
1343
|
-
// Multi-turn Search feature is currently at private GA stage. Please use
|
|
1344
|
-
// v1alpha or v1beta version instead before we launch this feature to public
|
|
1345
|
-
// GA. Or ask for allowlisting through Google Support team.
|
|
1346
1413
|
string session = 41 [(google.api.resource_reference) = {
|
|
1347
1414
|
type: "discoveryengine.googleapis.com/Session"
|
|
1348
1415
|
}];
|
|
@@ -1377,6 +1444,24 @@ message SearchRequest {
|
|
|
1377
1444
|
// Optional. The specification for returning the relevance score.
|
|
1378
1445
|
RelevanceScoreSpec relevance_score_spec = 52
|
|
1379
1446
|
[(google.api.field_behavior) = OPTIONAL];
|
|
1447
|
+
|
|
1448
|
+
// Optional. SearchAddonSpec is used to disable add-ons for search as per new
|
|
1449
|
+
// repricing model.
|
|
1450
|
+
// This field is only supported for search requests.
|
|
1451
|
+
SearchAddonSpec search_addon_spec = 62
|
|
1452
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1453
|
+
|
|
1454
|
+
// Optional. Optional configuration for the Custom Ranking feature.
|
|
1455
|
+
CustomRankingParams custom_ranking_params = 64
|
|
1456
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1457
|
+
|
|
1458
|
+
// Optional. The entity for customers that may run multiple different
|
|
1459
|
+
// entities, domains, sites or regions, for example, "Google US", "Google
|
|
1460
|
+
// Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
|
|
1461
|
+
// be exactly matched with
|
|
1462
|
+
// [UserEvent.entity][google.cloud.discoveryengine.v1.UserEvent.entity] to get
|
|
1463
|
+
// search results boosted by entity.
|
|
1464
|
+
string entity = 66 [(google.api.field_behavior) = OPTIONAL];
|
|
1380
1465
|
}
|
|
1381
1466
|
|
|
1382
1467
|
// Response message for
|
|
@@ -1429,6 +1514,36 @@ message SearchResponse {
|
|
|
1429
1514
|
// Optional. A list of custom clearbox signals.
|
|
1430
1515
|
repeated CustomSignal custom_signals = 33
|
|
1431
1516
|
[(google.api.field_behavior) = OPTIONAL];
|
|
1517
|
+
|
|
1518
|
+
// Optional. A list of precomputed expression results for a given
|
|
1519
|
+
// document, in the same order as requested in
|
|
1520
|
+
// `SearchRequest.custom_ranking_params.expressions_to_precompute`.
|
|
1521
|
+
repeated float precomputed_expression_values = 34
|
|
1522
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
// Contains a set of signals used by the relevance filter.
|
|
1526
|
+
message RetrievalSignals {
|
|
1527
|
+
// Indicates the source of the retrieval.
|
|
1528
|
+
enum RetrievalSource {
|
|
1529
|
+
// Unspecified retrieval source.
|
|
1530
|
+
RETRIEVAL_SOURCE_UNSPECIFIED = 0;
|
|
1531
|
+
|
|
1532
|
+
// Indicates the result was retrieved by keyword search.
|
|
1533
|
+
KEYWORD_SEARCH = 1;
|
|
1534
|
+
|
|
1535
|
+
// Indicates the result was retrieved by semantic search.
|
|
1536
|
+
SEMANTIC_SEARCH = 2;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
// Optional. Indicates how the result was retrieved.
|
|
1540
|
+
repeated RetrievalSource retrieval_sources = 1
|
|
1541
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1542
|
+
|
|
1543
|
+
// Optional. Relevance score used by the filter when
|
|
1544
|
+
// semantic_relevance_threshold is set.
|
|
1545
|
+
float semantic_relevance_score = 2
|
|
1546
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1432
1547
|
}
|
|
1433
1548
|
|
|
1434
1549
|
// [Document.id][google.cloud.discoveryengine.v1.Document.id] of the
|
|
@@ -1451,6 +1566,11 @@ message SearchResponse {
|
|
|
1451
1566
|
|
|
1452
1567
|
// Optional. A set of ranking signals associated with the result.
|
|
1453
1568
|
RankSignals rank_signals = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1569
|
+
|
|
1570
|
+
// Optional. A set of signals used by the relevance filter meant for use to
|
|
1571
|
+
// fine-tune the relevance filter thresholds.
|
|
1572
|
+
RetrievalSignals retrieval_signals = 11
|
|
1573
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1454
1574
|
}
|
|
1455
1575
|
|
|
1456
1576
|
// A facet result.
|
|
@@ -1874,6 +1994,14 @@ message SearchResponse {
|
|
|
1874
1994
|
// is set.
|
|
1875
1995
|
Summary summary = 9;
|
|
1876
1996
|
|
|
1997
|
+
// Optional. Controls applied as part of the Control service.
|
|
1998
|
+
repeated string applied_controls = 10 [
|
|
1999
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
2000
|
+
(google.api.resource_reference) = {
|
|
2001
|
+
type: "discoveryengine.googleapis.com/Control"
|
|
2002
|
+
}
|
|
2003
|
+
];
|
|
2004
|
+
|
|
1877
2005
|
// Query expansion information for the returned results.
|
|
1878
2006
|
QueryExpansionInfo query_expansion_info = 14;
|
|
1879
2007
|
|