What’s shipped

  • Backend endpoint: GET /search/vertex (calls Discovery Engine and returns ranked hits + snippets).
  • Web integration: Search and Advanced search use Vertex ranking when sort=relevance and Vertex is enabled.
  • Safe fallback: if Vertex is disabled, misconfigured, or times out, search falls back automatically.

How it works

The site still builds a server-side search index from published CMS content, latest papers, and curated catalog entries. When relevance sorting is selected, the backend can additionally query Vertex AI Search and use its ranking order to reorder the existing results list. If Vertex returns snippets, the result cards display those snippets.

Enable in production

Set these environment variables on the academiax-api Cloud Run service:

VERTEX_SEARCH_ENABLED=true
VERTEX_SEARCH_SERVING_CONFIG=projects/.../locations/.../collections/.../(engines|dataStores)/.../servingConfigs/...
VERTEX_SEARCH_TIMEOUT_SEC=8

If you use website indexing, ensure the Vertex AI Search engine is in Enterprise tier (SEARCH_TIER_ENTERPRISE) or website search requests will fail with FAILED_PRECONDITION.

Once enabled, the search pages will show a small “Ranked by Vertex AI Search” note for relevance-sorted queries when Vertex results are used.

Notes

  • Only public content should be indexed (exclude account/dashboard/admin routes).
  • Use timeouts to avoid long tail latency; the app already falls back safely.