Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
The Builder class of SearchSuggestionResult
.
Summary
Public constructors
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# SearchSuggestionResult.Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 7](https://developer.android.com/sdkExtensions)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/appsearch/SearchSuggestionResult.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|-----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.appsearch.SearchSuggestionResult.Builder](#) |\n\nThe Builder class of [SearchSuggestionResult](/reference/kotlin/android/app/appsearch/SearchSuggestionResult).\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [SearchSuggestionResult](/reference/kotlin/android/app/appsearch/SearchSuggestionResult) | [build](#build())`()` Build a [SearchSuggestionResult](/reference/kotlin/android/app/appsearch/SearchSuggestionResult) object |\n| [SearchSuggestionResult.Builder](#) | [setSuggestedResult](#setSuggestedResult(kotlin.String))`(`suggestedResult:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the suggested result that could be used as query expression in the [android.app.appsearch.AppSearchSession#search](/reference/kotlin/android/app/appsearch/AppSearchSession#search(kotlin.String,%20android.app.appsearch.SearchSpec)). |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 7](https://developer.android.com/sdkExtensions) \n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 7](https://developer.android.com/sdkExtensions) \n\n```\nfun build(): SearchSuggestionResult\n```\n\nBuild a [SearchSuggestionResult](/reference/kotlin/android/app/appsearch/SearchSuggestionResult) object\n\n| Return ||\n|------------------------------------------------------------------------------------------|------------------------------|\n| [SearchSuggestionResult](/reference/kotlin/android/app/appsearch/SearchSuggestionResult) | This value cannot be `null`. |\n\n### setSuggestedResult\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 7](https://developer.android.com/sdkExtensions) \n\n```\nfun setSuggestedResult(suggestedResult: String): SearchSuggestionResult.Builder\n```\n\nSets the suggested result that could be used as query expression in the [android.app.appsearch.AppSearchSession#search](/reference/kotlin/android/app/appsearch/AppSearchSession#search(kotlin.String,%20android.app.appsearch.SearchSpec)).\n\nThe suggested result should only contain lowercase or special characters.\n\n| Parameters ||\n|-------------------|----------------------------------------------------------------------------------------------------------------|\n| `suggestedResult` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n\n| Return ||\n|-------------------------------------|------------------------------|\n| [SearchSuggestionResult.Builder](#) | This value cannot be `null`. |"]]