Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Vertex AI Search for commerce Samples

This directory contains Java samples for Vertex AI Search for commerce.

Prerequisites

To run these samples, you must have:

  1. A Google Cloud Project with the Vertex AI Search for commerce API enabled.
  2. Vertex AI Search for commerce set up with a valid catalog and serving configuration (placement).
  3. Authentication: These samples use Application Default Credentials (ADC).
    • If running locally, you can set up ADC by running:
      gcloud auth application-default login
  4. IAM Roles: The service account or user running the samples needs the roles/retail.viewer (Retail Viewer) role or higher.

Samples

  • Search.java: Basic search request showing both text search and browse search (using categories).
  • SearchPagination.java: Shows how to use next_page_token to paginate through search results.
  • SearchOffset.java: Shows how to use offset to skip a specified number of results.

Documentation

For more information, see the Vertex AI Search for commerce documentation.