Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Feb 11, 2026

PR created by the Librarian CLI to generate Cloud Client Libraries code from protos.

BEGIN_COMMIT

BEGIN_NESTED_COMMIT
feat: add output-only field SemanticState to SearchResponse.

PiperOrigin-RevId: 868345232
Library-IDs: google-cloud-discoveryengine
Source-link: googleapis/googleapis@56bc1b49
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs: update documentation for search and data store NLQ features

PiperOrigin-RevId: 868345232
Library-IDs: google-cloud-discoveryengine
Source-link: googleapis/googleapis@56bc1b49
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs: other misc documentation updates
Clients can specify Natural Language Query Understanding-related fields, as well as CrowdingSpec. These features are available in the V1 APIs.

PiperOrigin-RevId: 868345232
Library-IDs: google-cloud-discoveryengine
Source-link: googleapis/googleapis@56bc1b49
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
feat: add Natural Language Query Understanding fields and messages to DiscoveryEngine request, response, and datastore messages

PiperOrigin-RevId: 868345232
Library-IDs: google-cloud-discoveryengine
Source-link: googleapis/googleapis@56bc1b49
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
feat: add CrowdingSpec to SearchRequest to set crowding settings

PiperOrigin-RevId: 868345232
Library-IDs: google-cloud-discoveryengine
Source-link: googleapis/googleapis@56bc1b49
END_NESTED_COMMIT

END_COMMIT

This pull request is generated with proto changes between
googleapis/googleapis@c288189b
(exclusive) and
googleapis/googleapis@56bc1b49
(inclusive).

Librarian Version: v0.7.0
Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:f5426423676c75008c2135037e7b98f78cbb99f78b3c46fe043b6897be92d836

@parthea parthea requested review from a team as code owners February 11, 2026 17:29
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @parthea, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates significant enhancements to the google-cloud-discoveryengine client library, primarily focusing on advanced search capabilities. It enables more intelligent query processing through Natural Language Understanding, allowing for automatic filter extraction and improved search relevance. Additionally, it provides mechanisms to control result diversity and offers clearer insights into the semantic processing applied to search queries.

Highlights

  • Natural Language Query Understanding (NLQ): Added extensive fields and messages to DiscoveryEngine requests, responses, and datastore configurations to support Natural Language Query Understanding capabilities, including filter extraction conditions, geo-search detection, and extracted filter behavior.
  • Crowding Specification: Introduced CrowdingSpec to SearchRequest to allow users to specify rules for improving search result diversity by limiting results that share the same field value.
  • Semantic State in Search Response: Added an output-only SemanticState field to SearchResponse to indicate whether semantic search was enabled or disabled for a given response.
  • Documentation and Field Updates: Updated documentation for NLQ features and CrowdingSpec, and made several existing fields in SearchRequest (like user_pseudo_id) optional, while also adding a page_categories field.
Changelog
  • .librarian/state.yaml
    • Updated the last_generated_commit for the google-cloud-discoveryengine library to reflect the latest proto generation.
  • packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/init.py
    • Imported NaturalLanguageQueryUnderstandingConfig from data_store types.
    • Added NaturalLanguageQueryUnderstandingConfig to the module's __all__ export list.
  • packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/init.py
    • Imported NaturalLanguageQueryUnderstandingConfig from data_store types.
    • Added NaturalLanguageQueryUnderstandingConfig to the module's __all__ export list.
  • packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py
    • Added NaturalLanguageQueryUnderstandingConfig to the manifest.
    • Included natural_language_query_understanding_config as an optional field in the DataStore message.
    • Defined the new NaturalLanguageQueryUnderstandingConfig proto message with Mode enum for enabling/disabling NLQ.
  • packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py
    • Added page_categories field to SearchRequest for category navigation queries.
    • Updated user_pseudo_id field in SearchRequest to be optional.
    • Reordered and added new fields to SearchRequest, including natural_language_query_understanding_spec and crowding_specs.
    • Defined new nested proto messages NaturalLanguageQueryUnderstandingSpec (with FilterExtractionCondition, ExtractedFilterBehavior, StringConstraint, NumberConstraint, GeolocationConstraint, AndExpression, OrExpression, Expression enums/messages) and CrowdingSpec (with Mode enum) within SearchRequest.
    • Added natural_language_query_understanding_info and semantic_state fields to SearchResponse.
    • Defined the SemanticState enum within SearchResponse to indicate the semantic processing state.
    • Marked rank_signals and its sub-fields (keyword_similarity_score, relevance_score, etc.) in SearchResponse.SearchResult as optional.
  • packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_data_store_service.py
    • Added natural_language_query_understanding_config with a mode of 1 to the test data for create_data_store and update_data_store REST calls.
  • packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_search_service.py
    • Added semantic_state=search_service.SearchResponse.SemanticState.DISABLED to the expected SearchResponse in various search and search_lite tests.
    • Reordered the session and ranking_expression fields in test requests for search and search_lite to match the updated proto definition.
Activity
  • The pull request was automatically generated by the Librarian CLI.
  • It incorporates changes from several nested commits, including feature additions and documentation updates.
  • New features include adding an output-only SemanticState to SearchResponse.
  • Documentation for Natural Language Query Understanding (NLQ) features and CrowdingSpec has been updated.
  • Natural Language Query Understanding fields and messages have been added to DiscoveryEngine request, response, and datastore messages.
  • CrowdingSpec has been added to SearchRequest to allow setting crowding settings.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request, generated by the Librarian CLI, introduces several new features to the Discovery Engine client library, primarily related to Natural Language Query Understanding (NLQ), search result crowding, and semantic search state reporting. The changes include new fields in request and response messages, new message types, and updated documentation. The corresponding unit tests have also been updated to cover these new features.

The changes are mostly auto-generated and look correct. I've found one minor formatting issue in a docstring which I've commented on. Otherwise, the changes are good to go.

Comment on lines +76 to +78
\`Graphics Cards > RTX_4090

Founders Edition\`
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There appears to be a formatting issue in the example for page_categories. The backslash \ seems to be a typo for a backtick `, and the example is split across multiple lines with incorrect indentation. This makes the example hard to read and understand. For clarity and consistency with other examples in this file, it should be a single-line code block using double backticks.

Suggested change
\`Graphics Cards > RTX_4090
Founders Edition\`
``Graphics Cards > RTX_4090 > Founders Edition``

@parthea parthea merged commit b483e92 into main Feb 11, 2026
27 checks passed
@parthea parthea deleted the librarian-20260211T172749Z branch February 11, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants