diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 1044e0b0ea5a..faff32646e1a 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1567,7 +1567,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-discoveryengine version: 0.17.0 - last_generated_commit: 256b575f6915282b20795c13414b21f2c0af65db + last_generated_commit: 59d5f2b46924714af627ac29ea6de78641a00835 apis: - path: google/cloud/discoveryengine/v1 service_config: discoveryengine_v1.yaml diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py index a608a6bc5449..2d227389ca27 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py @@ -503,11 +503,17 @@ class DataStoreSpec(proto.Message): [DataStore][google.cloud.discoveryengine.v1beta.DataStore], such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. + The path must include the project number, project id is not + supported for this field. filter (str): Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see `Filtering `__ + boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): + Optional. Boost specification to boost certain documents. + For more information on boosting, see + `Boosting `__ """ data_store: str = proto.Field( @@ -518,6 +524,11 @@ class DataStoreSpec(proto.Message): proto.STRING, number=5, ) + boost_spec: "SearchRequest.BoostSpec" = proto.Field( + proto.MESSAGE, + number=6, + message="SearchRequest.BoostSpec", + ) class FacetSpec(proto.Message): r"""A facet specification to perform faceted search. diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_evaluation_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_evaluation_service.py index 86de81be565a..81f4a4c638f0 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_evaluation_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_evaluation_service.py @@ -4677,7 +4677,29 @@ def test_create_evaluation_rest_call_success(request_type): "offset": 647, "one_box_page_size": 1792, "data_store_specs": [ - {"data_store": "data_store_value", "filter": "filter_value"} + { + "data_store": "data_store_value", + "filter": "filter_value", + "boost_spec": { + "condition_boost_specs": [ + { + "condition": "condition_value", + "boost": 0.551, + "boost_control_spec": { + "field_name": "field_name_value", + "attribute_type": 1, + "interpolation_type": 1, + "control_points": [ + { + "attribute_value": "attribute_value_value", + "boost_amount": 0.1306, + } + ], + }, + } + ] + }, + } ], "filter": "filter_value", "canonical_filter": "canonical_filter_value", @@ -4717,25 +4739,7 @@ def test_create_evaluation_rest_call_success(request_type): "enable_dynamic_position": True, } ], - "boost_spec": { - "condition_boost_specs": [ - { - "condition": "condition_value", - "boost": 0.551, - "boost_control_spec": { - "field_name": "field_name_value", - "attribute_type": 1, - "interpolation_type": 1, - "control_points": [ - { - "attribute_value": "attribute_value_value", - "boost_amount": 0.1306, - } - ], - }, - } - ] - }, + "boost_spec": {}, "params": {}, "query_expansion_spec": { "condition": 1,