Add multiple attribute indexes for feature classes or mosaic datasets

By Aileen Buckley, PhD, Esri Research Cartographer

Add Attribute Indexes thumbnail

Have you ever needed to create multiple indexes for either a feature class or mosaic dataset? The Add Indexes script tools help you speed up that process by automatically creating indexes for the fields you select. The Add Feature Class Indexes script tool adds attribute indexes to an existing feature class or overwrites its existing indexes. The Add Mosaic Dataset Indexes script tool adds attribute indexes to an existing mosaic dataset or overwrites its existing indexes.

Add Mosaic Dataset Indexes tool

For these tools, the list of fields to index is extracted from the feature class or mosaic dataset.

Fields to Index

The indexes will be single column/field indexes, with default characteristics of UNIQUE and ASCENDING. Index naming will follow the recommended naming convention for attribute indexes (that is, FieldName_IDX). The field name in the index will be truncated since the length of an index name is limited to 10 characters, including the _IDX suffix. Vowels will be removed. and names will be reduced to 6 characters, plus _IDX. For example, the index name for a field named Start_Time will be STRT_T_IDX.

Added Attribute Indexes

Duplicate index names may result because of this truncation. If this happens, the index will only be created for the last field with a duplicate name. For example, two fields named Control and Central will both be truncated to CNTRL_, resulting in duplicate index names of CNTRL_IDX. If the first field in the attribute table is Control and the second is Central, an index will be added for the Control field, then it will be deleted when the index is added for the Central field. As a result, the first field will not have an index. This can be created using the standard method after the tool has been used to create the other indexes.

These tools were developed to support the workflow associated with creating historical map collections and sharing them online. Keep an eye on this blog to find out more about when the documentation for that workflow, and associated downloadable resources, will be available. The documentation will include step-by-step instructions for using these tools and the download includes sample data that you can use to test out the workflow and these tools.

To learn more about creating attribute indexes, see

Thanks to Steven Lambert, Esri, for writing the code for these tools!

About the author

Dr. Aileen Buckley has been making maps since she was an undergraduate student. She has a Bachelors in Geography and Spanish from Valparaiso University, a Masters in Geography from Indiana University, and a Ph.D. in Geography from Oregon State University. She is a senior product engineer on the Living Atlas team, and her work focuses on determining and sharing best practices for mapping and analysis with modern GIS. She publishes and presents world-wide on many aspects of mapping and GIS. She is a co-author of Map Use: Reading, Analysis, Interpretation, and she is a co-editor for the Atlas of Oregon. Aileen is a former president of CaGIS (the U.S. cartographic association) and is actively involved with the International Cartographic Association in which she is the lead delegate for the United States.

Inline Feedbacks
View all comments

Next Article

When are expert sources right for your story?

Read this article