Stay organized with collections
Save and categorize content based on your preferences.
PutDocumentsRequest
class PutDocumentsRequest
Encapsulates a request to index documents into an AppSearchSession
database.
Summary
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,["# PutDocumentsRequest\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPutDocumentsRequest\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/appsearch/PutDocumentsRequest \"View this page in Java\") \n\n```\nclass PutDocumentsRequest\n```\n\n|---|------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.appsearch.PutDocumentsRequest](#) |\n\nEncapsulates a request to index documents into an [AppSearchSession](/reference/kotlin/android/app/appsearch/AppSearchSession) database.\n\nSummary\n-------\n\n| Nested classes ||\n|---|------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/app/appsearch/PutDocumentsRequest.Builder) Builder for [PutDocumentsRequest](#) objects. |\n\n| Public methods ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument)!\\\u003e | [getGenericDocuments](#getGenericDocuments())`()` Returns a list of [GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument) objects that are part of this request. |\n| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument)!\\\u003e | [getTakenActionGenericDocuments](#getTakenActionGenericDocuments())`()` Returns a list of [GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument) objects containing taken action metrics that are part of this request. |\n\nPublic methods\n--------------\n\n### getGenericDocuments\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getGenericDocuments(): MutableList\u003cGenericDocument!\u003e\n```\n\nReturns a list of [GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument) objects that are part of this request.\n\n| Return ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument)!\u003e | This value cannot be `null`. |\n\n### getTakenActionGenericDocuments\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 13](https://developer.android.com/sdkExtensions) \n\n```\nfun getTakenActionGenericDocuments(): MutableList\u003cGenericDocument!\u003e\n```\n\nReturns a list of [GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument) objects containing taken action metrics that are part of this request.\n\nSee [Builder.addTakenActionGenericDocuments(GenericDocument...)](/reference/kotlin/android/app/appsearch/PutDocumentsRequest.Builder#addTakenActionGenericDocuments(android.app.appsearch.GenericDocument)).\n\n| Return ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[GenericDocument](/reference/kotlin/android/app/appsearch/GenericDocument)!\u003e | This value cannot be `null`. |"]]