Get personalized browse results

Browsing uses navigational methods to display search results that match the end user's selected categories or filters. Browsing returns results that can be personalized. This page describes how to get browse results for generic search data stores.

About browse

In an AI Applications search app, to browse is to search with no query or an empty query. If you have a generic search data store that contains structured data, unstructured data with metadata, or website data, you can send an empty search query to receive browse results.

When you send a browse request, the documents in your data store that match the filters are returned according to event-based signals. You can deliver an enhanced browsing experience by doing the following:

  • Use filters in your search request to narrow down the search results. If you use advanced website indexing, see Use structured data for advanced website indexing to understand how to add metadata in your schema and use it to enrich your filter and boost fields.
  • Add a boost specification to influence the order of the returned results by boosting or burying specific results.
  • Understand user events and record them. Google uses your user events to optimize result ranking for click-through rate.

The following table presents the differences between searching and browsing.

Feature Search Browse
Purpose Find specific information Explore and discover content
Example Searching for "best Korean restaurants in Vancouver" on Google Search Browsing for a restaurant based on the categories where it might belong, such as "Restaurants > Korean > Vancouver > 4 star and above"
User Intent Typically goal-oriented Exploratory
Starting point A query or keyword typically in a search bar A specific website or platform typically using a menu, breadcrumbs, links, or other navigation methods like facets
Method Entering keywords or phrases and applying search and serving configuration Searching with an empty query, applying search and serving configuration
Results A list of relevant results All the documents in the data store that match the filters

Get browse results for an app with website data

To use the API to get browse results for an app with website data,

  1. Find your app ID. If you already have your app ID, skip to the next step.

    1. In the Google Cloud console, go to the AI Applications page.

      Go to Apps

    2. On the Apps page, find the name of your app and get the app's ID from the ID column.

  2. Call the engines.servingConfigs.search method with an empty query or no query as follows:

    REST

    curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:search" \
    -d '{
    "servingConfig": "projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search",
    "orderBy": "ORDER_BY",
    "params": {
         "searchType": "0"
     },
    "filter": "FILTER",
    "boostSpec": "BOOST_SPEC",
    }'
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • APP_ID: the ID of the Vertex AI Search app that you want to query.
    • ORDER_BY: optional. The order in which the results are arranged. The attribute to sort on must have a numerical interpretation—for example, date. For more information, see Order web search results.
    • FILTER: optional but recommended. A text field for filtering your search using a filter expression. The default value is an empty string. For more information about using the filter field, see Filter generic search for structured or unstructured data and Filter website search.
    • BOOST_SPEC: optional. A specification to boost or bury documents. Values:
      • BOOST: a floating point number in the range [-1,1]. When the value is negative, results are demoted (they appear lower down in the results). When the value is positive, results are promoted (they appear higher up in the results).
      • CONDITION: a text filter expression to select the documents to which boost is applied. The filter must evaluate to a boolean value. To learn about boost for structured search, see Boost search results.

    You should receive a JSON response similar to the following truncated response. The response contains itemized search results listed in the order that's determined by the fields set in the search request.