Editing
Troubleshooting of Google Vertex AI Search
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Resolving Issues with [https://cloud.google.com/enterprise-search?hl=en_us Google Vertex AI Search] and its API {{LanguageSwitcher | content = [[Troubleshooting of Google Vertex AI API | EN]], [[Troubleshooting of Google Vertex AI Search in Mandarin | 漢字]] }} == Issues == === Troubleshooting: Vertex AI Search: Data Repository Requires Enterprise Features === '''Error:''' When creating an application, encountered the error message "This application cannot currently use 4 data stores are..." Expanding the data repository list shows "Website data repository can only be linked to Enterprise version of Vertex AI Search applications" '''Solution:''' When creating the application, enable "[https://cloud.google.com/generative-ai-app-builder/docs/about-advanced-features?_gl=1*3htbzk*_ga*ODY1NjExNjI5LjE3MzUyMDY5NDM.*_ga_WH2QY8WWF5*MTczNTYyODg5MS40LjEuMTczNTYyOTQ5Ny4xMS4wLjA. Enterprise Edition Features]" === Troubleshooting: SearchLite API Blocked" Error in Discovery Engine === '''Issue Description''': When attempting to retrieve search results using Google Vertex AI API<ref>[https://cloud.google.com/generative-ai-app-builder/docs/preview-search-results Get search results | Vertex AI Agent Builder | Google Cloud]</ref>, the following error occurs: <pre> curl -X POST -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:searchLite?key=API_KEY" \ -d '{ "servingConfig": "projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search", "query": "QUERY", }' </pre> Met the error <pre> { "code" : 403, "message" : "Requests to this API discoveryengine.googleapis.com method google.cloud.discoveryengine.v1.SearchService.SearchLite are blocked.", "status" : "PERMISSION_DENIED", "details" : [ { "@type" : "type.googleapis.com/google.rpc.ErrorInfo", "reason" : "API_KEY_SERVICE_BLOCKED", "domain" : "googleapis.com", "metadata" : { "service" : "discoveryengine.googleapis.com", "methodName" : "google.cloud.discoveryengine.v1.SearchService.SearchLite", "apiName" : "discoveryengine.googleapis.com", "consumer" : "projects/xxx" } }, { "@type" : "type.googleapis.com/google.rpc.LocalizedMessage", "locale" : "en-US", "message" : "Requests to this API discoveryengine.googleapis.com method google.cloud.discoveryengine.v1.SearchService.SearchLite are blocked." } ] } </pre> '''Resolution Steps''': Check API Key Restrictions * Verify if the key is restricted to specific APIs: *# Navigate to the API Key Management page in Google Cloud Console. *# Locate the API key being used and check if it is restricted to specific APIs. If the restriction includes discoveryengine.googleapis.com, ensure it is correctly configured. *# Remove unnecessary restrictions: If the key is restricted to unrelated IP addresses or applications, remove those restrictions. * Enable the {{kbd | key=Discovery Engine API}} *# Go to the API & Services page in Google Cloud Console. *# Search for Discovery Engine API and ensure it is enabled. === Troubleshooting: "Requested Entity Already Exists" Error When Saving Data Stores === '''Error:''' When saving site indexing, the following error message appears<ref>[https://cloud.google.com/datastore/docs/concepts/errors Errors and Error Handling | Cloud Datastore Documentation | Google Cloud]</ref>: <pre> Failed to save sites Requested entity already exists Tracking number: <mix of English and numeric characters> </pre> '''Root Cause:''' Conflicting URL patterns exist simultaneously in "Specify URL patterns to index": <pre> example.com </pre> and <pre> *.example.com/* </pre> These two patterns conflict with each other, causing the system to treat them as duplicate entities. The detailed linking rules are mentioned in the official documentation: <pre> You can use the operations listed below Entire site: www.mysite.com/* Parts of site: www.mysite.com/faq/* Entire domain: *.mysite.com/* Quotes for exact match: "www.mysite.com/faq" Sites without quotes will match any path after the specified address: www.mysite.com/faq → www.mysite.com/faq*. </pre> '''Solution:''' Simply remove one of the patterns to resolve the issue. It's recommended to keep the broader pattern <code>*.example.com/*</code> as it already includes <code>example.com</code>. === Troubleshooting: "Quota exceeded for Search lite requests" Error in Discovery Engine === '''Issue Description''': When using Discovery Engine API to retrieve search results, the following error occurs: <pre> { "error" : { "code" : 429, "message" : "Quota exceeded for quota metric 'Search lite requests' and limit 'Search lite requests per minute' of service 'discoveryengine.googleapis.com' for consumer 'project_number:XXX'.", "status" : "RESOURCE_EXHAUSTED", ... } } </pre> '''Root cause:''' The metadata in the error response has indicated that the quota value is '''100 requests per minute''' '''Resolution Steps''': Resolve API Quota Limit Exceedance Option 1: Increase the delay time between requests # Implement this timing delay in your code to prevent 429 errors. 60 seconds ÷ 100 requests = 0.6 seconds per request e.g. Add a 0.6 ~ 1 second pause between each request to stay within rate limits # Adjust the delay time as needed based on your quota and request patterns Option 2: Increase quota limit # Go to the Quotas page in Google Cloud Console and find "Search lite requests per minute" # Select the relevant quota, click "EDIT QUOTAS", and submit a request for a higher limit # Wait for Google Cloud Support to review and approve Option 3: Implement exponential backoff retry mechanism # Detect HTTP 429 errors in your application and set an initial delay (e.g., 1 second) # Increase the delay time with each failed retry (e.g., 2 seconds, 4 seconds, 8 seconds, etc.) # Continue retrying until the request succeeds or maximum retry count is reached === Troubleshooting: Vertex AI Search: Engine Not Found Error === '''Error:''' When using Vertex AI Search API, encountering a 404 error: <pre> { "error": { "code": 404, "message": "Engine projects/<YOUR_PROJECT_ID>/locations/global/collections/default_collection/engines/<YOUR_APP_ID> not found.", "status": "NOT_FOUND" } } </pre> '''Solution:''' 1. Verify the correct APP ID (Engine ID): Open your browser and replace {{kbd | key=<nowiki><YOUR_APP_ID></nowiki>}} in the URL with the actual APP ID: <pre> https://console.cloud.google.com/gen-app-builder/locations/global/engines/<YOUR_APP_ID>/overview </pre> 2. Update the app_id in your code: 3. Validate the API endpoint: Ensure the curl request uses the correct engine ID: <pre> curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1alpha/projects/<YOUR_PROJECT_ID>/locations/global/collections/default_collection/engines/<YOUR_APP_ID>/servingConfigs/default_search:search" \ -d '{"query":"<QUERY>","pageSize":10,"queryExpansionSpec":{"condition":"AUTO"},"spellCorrectionSpec":{"mode":"AUTO"},"languageCode":"zh-TW","userInfo":{"timeZone":"Asia/Taipei"}}' </pre> === Troubleshooting: Vertex AI Search: Path Format Error When Enabling Grounding === Error encountered when enabling "[https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-vertex-ai-search Grounding with Vertex AI Search]": '''Error message:''' <pre> Path must follow this format: projects/{project_id}/locations/{location}/collections/{collection_name}/dataStores/{datastore_name} </pre> '''Solution:''' How to find the correct path parameters: # Navigate to https://console.cloud.google.com/gen-app-builder/engines # Select your datastore # Click the "Integration" tab # Look for the example command under "Run sample request in Cloud Shell" Example curl command: <pre> curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1alpha/projects/987654321000/locations/global/collections/default_collection/engines/vertex-search_123/servingConfigs/default_search:search" \ -d '{"query":"<QUERY>","pageSize":10,"queryExpansionSpec":{"condition":"AUTO"},"spellCorrectionSpec":{"mode":"AUTO"},"languageCode":"zh-TW","userInfo":{"timeZone":"Asia/Taipei"}}' </pre> Parameter extraction from the URL: From the URL path {{kbd | key=<nowiki>/projects/987654321000/locations/global/collections/default_collection/engines/vertex-search_123/</nowiki>}} # {project_id}: `987654321000` (the number after `/projects/`) # {location}: `global` (the string after `/locations/`) {{exclaim}} Note: Do not enter the [https://cloud.google.com/compute/docs/regions-zones geographic areas] of GCP server. You will met the error message e.g. "Invalid location in serving config: asia-east1" # {collection_name}: `default_collection` (the string after `/collections/`) # {datastore_name}: Found on the datastore overview page as "Datastore ID" (e.g., `XXX_1234567890123`) {{exclaim}} Note: The datastore_name is not visible in the engine URL - you need to check the datastore overview page to find the "Datastore ID". === Troubleshooting: Vertex AI Discovery Engine: Search Returns No Results === Issue encountered when searching with keywords against a Vertex AI Discovery Engine Data Store: the query executes successfully but returns no content. '''Symptom:''' The API responds with empty result arrays: <pre> { "attributionToken" : "xxxx", "guidedSearchResult" : [], "summary" : [], "semanticState" : "DISABLED" } </pre> '''Cause:''' The query syntax is correct, but the target website is outside the indexing scope of the Data Store specified by the Vertex API. For example, attempting to search <code>aaa.com</code> while the Data Store only indexes <code>example.com</code> will return no results, since the engine can only retrieve content it has actually crawled and indexed. '''Solution:''' Verify and expand the indexed website scope: # Navigate to https://console.cloud.google.com/gen-app-builder # Open the Data Store referenced by your Vertex API call # Check the configured website scope under the "Data" tab # Confirm whether the target domain (e.g., `aaa.com`) is included If the target domain is not covered, you must create a dedicated Data Store for it: # In '''GCP Console → Vertex AI Search''', create a new Data Store for `aaa.com` # Configure '''website crawling''' for that domain {{exclaim}} Note: Each Data Store indexes only its own configured site list — a query cannot reach content outside the Data Store's crawl scope, regardless of how correct the query syntax is. == Related Pages == * [[Customized Search Engine]] written in Mandarin * [[Troubleshooting of curl errors]] if you are using curl command. * [[Troubleshooting of HTTP errors]] == Further readings == * [https://www.youtube.com/watch?v=cPJIHHbDdGk&t=1s Building an Enterprise Search app using Vertex AI Search on Google Cloud (Demo) - YouTube] * [https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-vertex-ai-search Grounding with Vertex AI Search | Generative AI on Vertex AI | Google Cloud] == References == <references /> [[Category: Search]] [[Category: Google]] [[Category: Revised with LLMs]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Exclaim
(
edit
)
Template:Kbd
(
edit
)
Template:LanguageSwitcher
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information