Added in API level 31

GetByDocumentIdRequest

class GetByDocumentIdRequest
kotlin.Any
   ↳ android.app.appsearch.GetByDocumentIdRequest

Encapsulates a request to retrieve documents by namespace and IDs from the AppSearchSession database.

Summary

Nested classes

Builder for GetByDocumentIdRequest objects.

Constants
static String

Schema type to be used in GetByDocumentIdRequest.Builder#addProjection to apply property paths to all results, excepting any types that have had their own, specific property paths set.

Public methods
MutableSet<String!>

Returns the set of document IDs attached to the request.

String

Returns the namespace attached to the request.

MutableMap<String!, MutableList<PropertyPath!>!>

Returns a map from schema type to property paths to be used for projection.

MutableMap<String!, MutableList<String!>!>

Returns a map from schema type to property paths to be used for projection.

Constants

PROJECTION_SCHEMA_TYPE_WILDCARD

Added in API level 31
static val PROJECTION_SCHEMA_TYPE_WILDCARD: String

Schema type to be used in GetByDocumentIdRequest.Builder#addProjection to apply property paths to all results, excepting any types that have had their own, specific property paths set.

Value: "*"

Public methods

getIds

Added in API level 31
fun getIds(): MutableSet<String!>

Returns the set of document IDs attached to the request.

Return
MutableSet<String!> This value cannot be null.

getNamespace

Added in API level 31
fun getNamespace(): String

Returns the namespace attached to the request.

Return
String This value cannot be null.

getProjectionPaths

Added in API level 34
fun getProjectionPaths(): MutableMap<String!, MutableList<PropertyPath!>!>

Returns a map from schema type to property paths to be used for projection.

If the map is empty, then all properties will be retrieved for all results.

Calling this function repeatedly is inefficient. Prefer to retain the Map returned by this function, rather than calling it multiple times.

Return
MutableMap<String!, MutableList<PropertyPath!>!> This value cannot be null.

getProjections

Added in API level 31
fun getProjections(): MutableMap<String!, MutableList<String!>!>

Returns a map from schema type to property paths to be used for projection.

If the map is empty, then all properties will be retrieved for all results.

Calling this function repeatedly is inefficient. Prefer to retain the Map returned by this function, rather than calling it multiple times.

Return
MutableMap<String!, MutableList<String!>!> This value cannot be null.