Indexable
Stay organized with collections
Save and categorize content based on your preferences.
Represents an indexable unit.
Indexables are not thread-safe. Do not create, modify, or access one Indexable from
different threads, otherwise a ConcurrentModificationException
could be thrown.
Constants
public static final int
MAX_BYTE_SIZE
public static final int
MAX_INDEXABLES_TO_BE_UPDATED_IN_ONE_CALL
public static final int
MAX_REPEATED_SIZE
The maximum number of elements in a repeatable Indexable
field. Additional elements will be discarded.
Constant Value:
100
public static final int
MAX_STRING_LENGTH
public static final int
MAX_URL_LENGTH
public static final String
THING
Names of the predefined Indexable
type Thing.
Constant Value:
"Thing"
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 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 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eIndexable\u003c/code\u003e represents an indexable unit within the Google App Indexing API and is not thread-safe, meaning it should not be accessed from multiple threads concurrently to avoid \u003ccode\u003eConcurrentModificationException\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can construct \u003ccode\u003eIndexable\u003c/code\u003e objects using the provided \u003ccode\u003eIndexable.Builder\u003c/code\u003e class and associate metadata with them through the \u003ccode\u003eIndexable.Metadata\u003c/code\u003e interface.\u003c/p\u003e\n"],["\u003cp\u003eSeveral constants define limits for \u003ccode\u003eIndexable\u003c/code\u003e objects, including maximum byte size (\u003ccode\u003eMAX_BYTE_SIZE\u003c/code\u003e), maximum string length (\u003ccode\u003eMAX_STRING_LENGTH\u003c/code\u003e), and maximum URL length (\u003ccode\u003eMAX_URL_LENGTH\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTHING\u003c/code\u003e constant represents the predefined "Thing" type for \u003ccode\u003eIndexable\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThere is a limit on the number of indexables that can be updated in a single call (\u003ccode\u003eMAX_INDEXABLES_TO_BE_UPDATED_IN_ONE_CALL\u003c/code\u003e), and a limit on the number of elements in a repeatable field (\u003ccode\u003eMAX_REPEATED_SIZE\u003c/code\u003e).\u003c/p\u003e\n"]]],["`Indexable` represents an indexable unit, which is not thread-safe. Use `Indexable.Builder` to create them and `Indexable.Metadata` for metadata. Key limits include: `MAX_BYTE_SIZE` (30000), `MAX_INDEXABLES_TO_BE_UPDATED_IN_ONE_CALL` (1000), `MAX_REPEATED_SIZE` (100), `MAX_STRING_LENGTH` (20000), and `MAX_URL_LENGTH` (256). The `THING` constant value is \"Thing\", representing the predefined `Indexable` type. Exceeding these limits will lead to discarded or truncated data.\n"],null,["# Indexable\n\npublic interface **Indexable** \nRepresents an indexable unit.\n\nIndexables are not thread-safe. Do not create, modify, or access one Indexable from\ndifferent threads, otherwise a [ConcurrentModificationException](//developer.android.com/reference/java/util/ConcurrentModificationException.html)\ncould be thrown. \n\n### Nested Class Summary\n\n|-----------|---|---|-----------------------------------------------------------------------------------------------------------|\n| class | [Indexable.Builder](/android/reference/com/google/android/gms/appindex/Indexable.Builder) || The builder for [Indexable](/android/reference/com/google/android/gms/appindex/Indexable). |\n| interface | [Indexable.Metadata](/android/reference/com/google/android/gms/appindex/Indexable.Metadata) || Represents the metadata for an [Indexable](/android/reference/com/google/android/gms/appindex/Indexable). |\n\n### Constant Summary\n\n|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [MAX_BYTE_SIZE](/android/reference/com/google/android/gms/appindex/Indexable#MAX_BYTE_SIZE) | The maximum byte size of an [Indexable](/android/reference/com/google/android/gms/appindex/Indexable). |\n| int | [MAX_INDEXABLES_TO_BE_UPDATED_IN_ONE_CALL](/android/reference/com/google/android/gms/appindex/Indexable#MAX_INDEXABLES_TO_BE_UPDATED_IN_ONE_CALL) | |\n| int | [MAX_REPEATED_SIZE](/android/reference/com/google/android/gms/appindex/Indexable#MAX_REPEATED_SIZE) | The maximum number of elements in a repeatable [Indexable](/android/reference/com/google/android/gms/appindex/Indexable) field. |\n| int | [MAX_STRING_LENGTH](/android/reference/com/google/android/gms/appindex/Indexable#MAX_STRING_LENGTH) | The maximum [String.length()](//developer.android.com/reference/java/lang/String.html#length()) of a [String](//developer.android.com/reference/java/lang/String.html) field of an [Indexable](/android/reference/com/google/android/gms/appindex/Indexable). |\n| int | [MAX_URL_LENGTH](/android/reference/com/google/android/gms/appindex/Indexable#MAX_URL_LENGTH) | The maximum [String.length()](//developer.android.com/reference/java/lang/String.html#length()) of an [Indexable](/android/reference/com/google/android/gms/appindex/Indexable) URL string. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [THING](/android/reference/com/google/android/gms/appindex/Indexable#THING) | Names of the predefined [Indexable](/android/reference/com/google/android/gms/appindex/Indexable) type Thing. |\n\nConstants\n---------\n\n#### public static final int\n**MAX_BYTE_SIZE**\n\nThe maximum byte size of an [Indexable](/android/reference/com/google/android/gms/appindex/Indexable). \nConstant Value: 30000 \n\n#### public static final int\n**MAX_INDEXABLES_TO_BE_UPDATED_IN_ONE_CALL**\n\nConstant Value: 1000 \n\n#### public static final int\n**MAX_REPEATED_SIZE**\n\nThe maximum number of elements in a repeatable [Indexable](/android/reference/com/google/android/gms/appindex/Indexable)\nfield. Additional elements will be discarded. \nConstant Value: 100 \n\n#### public static final int\n**MAX_STRING_LENGTH**\n\nThe maximum [String.length()](//developer.android.com/reference/java/lang/String.html#length())\nof a [String](//developer.android.com/reference/java/lang/String.html) field of an\n[Indexable](/android/reference/com/google/android/gms/appindex/Indexable).\n[String](//developer.android.com/reference/java/lang/String.html) values\nlonger than this will be truncated. \nConstant Value: 20000 \n\n#### public static final int\n**MAX_URL_LENGTH**\n\nThe maximum [String.length()](//developer.android.com/reference/java/lang/String.html#length())\nof an [Indexable](/android/reference/com/google/android/gms/appindex/Indexable)\nURL string. \nConstant Value: 256 \n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**THING**\n\nNames of the predefined [Indexable](/android/reference/com/google/android/gms/appindex/Indexable)\ntype Thing. \nConstant Value: \"Thing\""]]