Skip to content

Commit 537fd48

Browse files
Google APIscopybara-github
authored andcommitted
feat: add lite search API to allow public website search with API key
feat: add LOW_GROUNDED_ANSWER in answer skip reasons feat: support query regex in control match rules docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 689588291
1 parent 17aef37 commit 537fd48

5 files changed

Lines changed: 51 additions & 6 deletions

File tree

google/cloud/discoveryengine/v1/answer.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ message Answer {
363363
//
364364
// Google skips the answer if the query doesn't have clear intent.
365365
NON_ANSWER_SEEKING_QUERY_IGNORED_V2 = 8;
366+
367+
// The low-grounded answer case.
368+
//
369+
// Google skips the answer if a well grounded answer was unable to be
370+
// generated.
371+
LOW_GROUNDED_ANSWER = 9;
366372
}
367373

368374
// Immutable. Fully qualified name

google/cloud/discoveryengine/v1/control.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ message Condition {
6262

6363
// Search only
6464
// A list of terms to match the query on.
65+
// Cannot be set when
66+
// [Condition.query_regex][google.cloud.discoveryengine.v1.Condition.query_regex]
67+
// is set.
6568
//
6669
// Maximum of 10 query terms.
6770
repeated QueryTerm query_terms = 2;
@@ -70,6 +73,12 @@ message Condition {
7073
//
7174
// Maximum of 10 time ranges.
7275
repeated TimeRange active_time_range = 3;
76+
77+
// Optional. Query regex to match the whole search query.
78+
// Cannot be set when
79+
// [Condition.query_terms][google.cloud.discoveryengine.v1.Condition.query_terms]
80+
// is set. This is currently supporting promotion use case.
81+
string query_regex = 4 [(google.api.field_behavior) = OPTIONAL];
7382
}
7483

7584
// Defines a conditioned behavior to employ during serving.

google/cloud/discoveryengine/v1/discoveryengine_v1.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ authentication:
164164
oauth:
165165
canonical_scopes: |-
166166
https://www.googleapis.com/auth/cloud-platform
167+
- selector: google.cloud.discoveryengine.v1.SearchService.SearchLite
168+
oauth:
169+
canonical_scopes: |-
170+
https://www.googleapis.com/auth/cloud-platform
167171
- selector: google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels
168172
oauth:
169173
canonical_scopes: |-

google/cloud/discoveryengine/v1/document_service.proto

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,11 @@ message BatchGetDocumentsMetadataResponse {
402402
// [Document][google.cloud.discoveryengine.v1.Document].
403403
string uri = 1;
404404

405-
// Required. Format:
405+
// Format:
406406
// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}
407-
string fhir_resource = 2 [
408-
(google.api.resource_reference) = {
409-
type: "healthcare.googleapis.com/FhirResource"
410-
}
411-
];
407+
string fhir_resource = 2 [(google.api.resource_reference) = {
408+
type: "healthcare.googleapis.com/FhirResource"
409+
}];
412410
}
413411
}
414412

google/cloud/discoveryengine/v1/search_service.proto

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,34 @@ service SearchService {
5555
}
5656
};
5757
}
58+
59+
// Performs a search. Similar to the
60+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
61+
// method, but a lite version that allows API key for authentication, where
62+
// OAuth and IAM checks are not required.
63+
//
64+
// Only public website search is supported by this method. If data stores and
65+
// engines not associated with public website search are specified, a
66+
// `FAILED_PRECONDITION` error is returned.
67+
//
68+
// This method can be used for easy onboarding without having to implement an
69+
// authentication backend. However, it is strongly recommended to use
70+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
71+
// instead with required OAuth and IAM checks to provide better data security.
72+
rpc SearchLite(SearchRequest) returns (SearchResponse) {
73+
option (google.api.http) = {
74+
post: "/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite"
75+
body: "*"
76+
additional_bindings {
77+
post: "/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite"
78+
body: "*"
79+
}
80+
additional_bindings {
81+
post: "/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite"
82+
body: "*"
83+
}
84+
};
85+
}
5886
}
5987

6088
// Request message for

0 commit comments

Comments
 (0)