---
schema_version: "1"
id: 486fdf420041e62ef1a980b720b17428be472b147d93d19b0066d9c44e722c89
title: Index
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_index.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_index.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4e9843d6a1ec192912238d4169742a2f5e8d47842145d5987a8f805373fa98ee
description: Represents an index defined within a custom big object. Use this metadata type to define the composite primary key (index) for a custom big object. This type extends the Metadata metadata type and inherits its fullName field.
---
# Index

Represents an index defined within a custom [big object](https://developer.salesforce.com/docs/atlas.en-us.264.0.bigobjects.meta/bigobjects/big_object.htm). Use this metadata type to define the composite primary key (index) for a custom big object. This type extends the Metadata metadata type and inherits its fullName field.

## File Suffix and Directory Location

Indexes are user-defined and are part of the custom object definition for big objects. See [CustomObject](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/customobject.htm) for more information.

## Version

The Index type is available in API version 41.0 and later.

## Fields

| Field Name | Field Type | Description |
| --- | --- | --- |
| fields | IndexField\[\] | The definition of the fields in the index. |
| label | string | Required. This name is used to refer to the big object in the user interface. Available in API version 41.0 and later. |

## IndexField

Defines which fields make up the index, their order, and sort direction. The order in which the fields are defined determines the order fields are listed in the index.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d578207e153">Field Name</th>

              <th class="featureTableHeader  " id="d578207e156">Field Type</th>

              <th class="featureTableHeader  " id="d578207e159">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d578207e153" data-title="Field Name"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d578207e156" data-title="Field Type">string</td>

              <td class="entry" headers="d578207e159" data-title="Description">Required. The API name for the field that’s part of the index. This value must
                match the <samp class="codeph nolang">fullName</samp> value for the corresponding
                field in the fields section and be marked as required.<p class="p">It's important to note that
                  when querying a big object record via SOQL and passing the results as arguments to
                  the delete API, if any index field name has a leading or trailing white space, you
                  can't delete the big object record.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d578207e153" data-title="Field Name"><span class="keyword parmname">sortDirection</span></td>

              <td class="entry" headers="d578207e156" data-title="Field Type">string</td>

              <td class="entry" headers="d578207e159" data-title="Description">Required. The sort direction of the field in the index. Valid values are
                <samp class="codeph nolang">ASC</samp> for ascending order and <samp class="codeph nolang">DESC</samp> for descending order.
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of an index contained within the definition of a custom big object, Customer\_Interactions\_\_b.object.

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">

    <deploymentStatus\>Deployed</deploymentStatus\>

// Define the fields within the big object
    <fields\>
        <fullName\>Purchase\_\_c</fullName\>
        <label\>Purchase</label\>
        <length\>16</length\>
        <required\>false</required\>
        <type\>Text</type\>
        <unique\>false</unique\>
    </fields\>
    
    <fields\>
        <fullName\>Order\_Number\_\_c</fullName\>
        <label\>Order Number</label\>
        <length\>16</length\>
        <required\>false</required\>
        <type\>Text</type\>
        <unique\>true</unique\>
    </fields\>
    
    <fields\>
        <fullName\>Platform\_\_c</fullName\>
        <label\>Platform</label\>
        <length\>16</length\>
        <required\>true</required\>
        <type\>Text</type\>
        <unique\>false</unique\>
    </fields\>

    <fields\>
        <fullName\>Account\_\_c</fullName\>
        <label\>User Account</label\>
        <referenceTo\>Account</referenceTo\>
        <relationshipName\>User\_Account</relationshipName\>
        <required\>true</required\>
        <type\>Lookup</type\>
    </fields\>

    <fields\>
        <fullName\>Order\_Date\_\_c</fullName\>
        <label\>Order Date</label\>
        <required\>true</required\>
        <type\>DateTime</type\>
    </fields\>

// Define the index
    <indexes\>
        <fullName\>CustomerInteractionsIndex</fullName\>
        <label\>Customer Interactions Index</label\>
        <fields\>
            <name\>Account\_\_c</name\>
            <sortDirection\>DESC</sortDirection\>
        </fields\>
        <fields\>
            <name\>Platform\_\_c</name\>
            <sortDirection\>ASC</sortDirection\>
        </fields\>
        <fields\>
            <name\>Order\_Date\_\_c</name\>
            <sortDirection\>DESC</sortDirection\>
        </fields\>
    </indexes\>
    
    <label\>Customer Interaction</label\>
    <pluralLabel\>Customer Interactions</pluralLabel\>
</CustomObject\>

## Wildcard Support in the Manifest File

This metadata type doesn’t support the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).

- [← Previous](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_historyretentionpolicy.htm "HistoryRetentionPolicy")
- [Next →](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_listview.htm "ListView")

#### See Also

- [CustomObject](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customobject.htm "Represents a custom object that stores data unique to your org or an external object that maps to data stored outside your org.")
- [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.")