Configure results for the search widget Stay organized with collections Save and categorize content based on your preferences.
This section describes how to configure results for the search widget, dependingon the type of search app you have.
If you use third-party access control for your data sources, these configurationsettings also apply to the web app.
Search widget concepts
Here are some concepts to help you understand how to use the controls ontheUI tab.
Snippet: A short section of text, typically a sentence, under thedocument title. By default, a snippet is displayed for each search result forwebsite and unstructured data.
Search with an answer: This feature provides a paragraph of information(the answer) synthesized from the top results of website or unstructured data.You can customize the number of top results that the answer is based on. Bydefault, the top five results are summarized to create the answer. Search withan answer cannot be combined with Search with follow-ups.
Search with follow-ups: This feature for website and unstructured dataallows for follow-up questions that keep the context of the initial searchquery.
Autocomplete: Suggests search queries based on the first letters thatusers enter into the search bar. For more information, seeConfigureautocomplete.
Feedback: Provides buttons
thumb_up and thumb_down so that users can ratethe quality of the search results. This information is sent only to Google.For more information, seeConfigure widget feedback. Metadata: If the data is structured or contains metadata, youcan configure which metadata fields to include in the search results. You can also mapfields to display names for facets. For more information, seeConfigure facets for the search widget.
Select an LLM: The stable LLM version is chosen by default for yourapplication. To change the LLM version, seeSearch summarization differs by model.
Turning off generative responses: Ifyou turn off generative responses for a search widget, theadvanced LLMfeature, such as search with follow-ups andsearch with an answer, stop working for all users of the project. SeeTurngenerative responses on or off.
Image in answers: This feature returns the following kinds of images withthe answers:
- Charts generated from information in the answer
- Images selected from an unstructured data store that a layout parser parses
Use this feature withSearch with an answer orSearch withfollow-ups and the stable large language model or any Geminimodel 2.0 or later. To return images from the corpus in the answer,enable snippets or extractive content. For more information, seeGeneratecharts for answer andRetrieve existing images from the datastore.
Search-as-you-type: Available only for media apps. This feature performs asearch after each keystroke. You don't need to pressEnterto get a search result. For more information, seeGet search-as-you-typeresults for a media app.
Configure search results for unstructured or website data
The search widget for unstructured and website data offers the following searchcustomizations:
- Search (single-turn)
- Search with an answer (single-turn search with summarization)
- Search with follow-ups (multi-turn search)
For search with an answer and search with follow-ups, you need turn on someadvanced settings:
For search apps with unstructured data:Generative responses
For website search apps:Generative responses andAdvanced website indexing
To configure how the widget displays search results for unstructured data:
In the Google Cloud console, go to theAI Applications page.
Click the name of the app that you want to edit.
In the navigation menu, clickConfigurations.
Click theUI tab.
Edit the fields on the tab.
Use thePreview pane to make sure your changes are displayedas expected.
ClickSave and publish to apply your changes.
Configure search results for healthcare data
The search widget for healthcare data offers the following search customizations:
- Search
- Search with an answer
For search with an answer, turn on theGenerative responses option.
To configure how the widget displays search results for healthcare data:
In the Google Cloud console, go to theAI Applications page.
Click the name of the app that you want to edit.
In the navigation menu, clickConfigurations.
Click theUI tab.
In theSearch type list, select one of the following:
- Search: to perform a single-turn search
- Search with an answer: to perform a single-turn search with a generative AI generated answer
If you selectedSearch with an answer, in theLarge language modelsfor summarization section, select one of the models that is supported forhealthcare. SeeGenerally available (GA) models.
ClickSave and publish to apply your changes.
Configure search results for structured data
Note: This feature is a Preview offering, subject to the "Pre-GA Offerings Terms"of theGCP Service Specific Terms.Pre-GA products and features may have limited support, andchanges to pre-GA products and features may not be compatible with other pre-GAversions. For more information, see thelaunch stage descriptions.Further, by using this feature, you agree to theGenerative AI Preview terms and conditions("Preview Terms"). For this feature, you can process personal data as outlined in theCloud Data Processing Addendum,subject to applicable restrictions and obligations in the Agreement (as defined in the Preview Terms).For structured data, by default, the widget displays all of the name-valuepairs for each item in the search results. You can use theConfigurationspage in the Google Cloud console to customize how the widget displays searchresults.
The following list shows the primary fields for displaying search results:
- Title. An item title that a user can click to select that item in asearch result.
- Thumbnail. The URL of an image to be shown next to the item title in asearch result.
- URL. A URL that the user is taken to when they click the item's title.
You can display up to three additional fields in your search results andconfigure how they appear.
In addition, you can select facets to filter search results on and set displaynames for them. For more about configuring widget facets, seeConfigure facetsfor the search widget.
To configure how the widget displays search results for structured data:
In the Google Cloud console, go to theAI Applications page.
Click the name of the search app that you want to edit.
ClickConfigurations.
Click theUI tab.
If you have multiple data stores connected to your app, select the datastore to configure results for.
Expand theConfigure fields in results section.
In thePreview pane, type a query and pressEnter to view how searchresults are displayed with your current settings. The preview updatesautomatically when you enter new settings.
Optional: Click a device icon to see the preview in desktop or mobileformat.
To configure the primary fields (Title,Thumbnail, andURL) inyour search results:
Click theTitle box and select a field to map to the titles of yoursearch results. Or, selectNone if you don't want titles to appearin search results.
Click theThumbnail box and select a field to map to the thumbnailimages in your search results. Or, selectNone if you don't wantthumbnail images to appear in search results.
Click theURL box and select a field that maps to the items thatopen when users click item titles in search results. Or, selectNoneif you don't want item titles in your search results to link toitems.
To add additional fields to your search results:
Click theText 1 box and select a field that you want to display inyour search results. By default, only the field value is displayed insearch results.
Click the arrow next to theText 1 box to display theTemplatebox. The{value} field inTemplate box represents the fieldvalue to display in the search result. Add text before or after the{value} field (or both) to give context to the value in the searchresults. For example, suppose you selected
pricein theText 1box, and the price value for a particular item is 42. If you update theTemplate field to"TotalPrice: {value} USD", then "Total Price: 42 USD" is displayed in thesearch results for that item.To add additional fields, repeat these steps for theText 2 andText 3 boxes.
To configure facet settings:
Expand theFacet settings section.
ClickAdd facet.
Select a field to set as a facet and enter a display name.
To add more facets, clickAdd facet.
Check thePreview pane to make sure your changes display correctly.
ClickSave and publish to apply your changes.
For information about enabling feedback, seeConfigure widgetfeedback.
Next steps
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.