# Indexing -------------------------------------------------------------------------------- title: "Introduction" description: "Catalyst NoSQL is a fully-managed, powerful database that provides you with a non-relational, non-SQL means of data storage. Create, manage, and query data in NoSQL tables with ease, and perform CRUD operations in Java, Node.js, and Python." last_updated: "2026-03-18T07:41:08.534Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/indexing/introduction/" service: "Cloud Scale" -------------------------------------------------------------------------------- # Indexing in NoSQL Catalyst NoSQL provides the ability to create indexes for NoSQL tables that will allow you to execute alternate queries on the table data, without making use of the primary keys. This means that you can create and utilize secondary indexes and search for data items by other attributes besides the {{%link href="/en/cloud-scale/help/nosql/components/#table-keys" %}}partition key and sort key{{%/link%}}. Indexes facilitate convenience and add flexibility in data retrieval operations, as come in handy during scenarios that require you to prioritize non-conventional attributes in a table. Querying using indexes quickens the data read process and promotes efficiency. You can also modify or delete indexes in a table based on your requirements without affecting the main table in any manner. ### Architecture of Indexes Catalyst NoSQL indexes span across the entire table and all partitions that the table data is stored in. This cross-partition or {{%bold%}}global indexing{{%/bold%}} feature proves highly beneficial as it allows you to execute queries across all partition keys of a table. Catalyst enables you to create a maximum of 20 indexes for a table. You can configure individual partition keys and sort keys for each index you create. Because the indexing is global, you will be able to configure partition and sort keys different from the ones configured in the main table. Essentially, an index can be regarded as a copy of the main table created with different partition and sort keys for different requirements in querying data. In terms of the architecture, when an index is created for a table, a copy of it is stored in different storage nodes with the same partitioning rules as applicable for the main table. Therefore, when you execute queries based on a secondary index, you can still access all the attributes and data of the table. {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst will automatically update indexes when you add, update, or delete data from its base table.{{%/note%}} <br> ### Index Types Catalyst provides three different ways to index a table in NoSQL: * {{%bold%}}Indexing All Attributes{{%/bold%}}: This will create an index of all the attributes in a table. When you choose this option, Catalyst will essentially replicate all the table attributes and store them based on the partition key you configure for the index. * {{%bold%}}Indexing Only Keys{{%/bold%}}: This will index only the partition key, sort key, and the additional sort key attributes, if any, in a table. These key attributes are stored based on the partition key you configure for the index. * {{%bold%}}Indexing Specific Attributes{{%/bold%}}: This will index specific attributes of a table that you select. The select attributes are replicated and stored based on the partition key you configure for the index. When you execute a query based on an index, the partition key and sort key attributes of the table and the index will be returned along with other attributes based on the type you configured. Let's understand indexing better with an example. The Menu table discussed in the previous sections is updated and shown below. #### Sample Table Representation {{%bold%}}Table Name{{%/bold%}}- Menu {{%code class="language-json line-numbers" scroll="set-scroll" %}}{ "item": { "Category": { "S": "Pizza" }, "DishName": { "S": "Vegan" }, "Calories": { "N": 350 }, "PreparationTime": { "N": 20 }, "DiscountPercentage": { "N": 12 }, "KeyIngredients": { "L": [ { "S": "Pizza Base" }, { "S": "Pizza Sauce" }, { "S": "Olives" }, { "S": "Bell Peppers" }, { "S": "Corn" }, { "S": "Onions" } ] } }, "item": { "Category": { "S": "Pizza" }, "DishName": { "S": "Chicken Overload" }, "Cost": { "N": 25 }, "DiscountPercentage": { "N": 15 }, "Calories": { "N": 450 }, "PreparationTime": { "N": 30 } }, "item": { "Category": { "S": "Sandwich" }, "DishName": { "S": "Vegan" }, "Calories": { "N": 300 }, "PreparationTime": { "N": 20 }, "Cost": { "N": 20 }, "DiscountPercentage": { "N": 10 } } } {{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} The table presented here is a representation of the {{%bold%}}Catalyst Custom JSON format{{%/bold%}}. The formats for constructing data in each server-side SDK in this JSON format varies. To learn about the general syntax of the Catalyst Custom JSON format present in this table, as well as the supported data types and their notations, refer to {{%link href="/en/cloud-scale/help/nosql/working-with-data/introduction/#the-catalyst-custom-json-format" %}}this section{{%/link%}}. {{%/note%}} Assume you create an index, {{%italics%}}Pricing{{%/italics%}}, for this table with the following configurations- * {{%bold%}}Partition Key{{%/bold%}}: {{%badge%}}Cost{{%/badge%}} * {{%bold%}}Sort Key{{%/bold%}}: {{%badge%}}DiscountPercentage{{%/badge%}} * {{%bold%}}Index Type{{%/bold%}}: Specific Attributes ({{%badge%}}Calories{{%/badge%}} and {{%badge%}}PreparationTime{{%/badge%}}) Given below is a representation of the created index. #### Sample Index Representation {{%bold%}}Index Name{{%/bold%}}- Pricing {{%code class="language-json line-numbers" scroll="set-scroll" %}}{ "item": { "Cost": { "N": 25 }, "DiscountPercentage": { "N": 15 }, "Category": { "S": "Pizza" }, "DishName": { "S": "Chicken Overload" } "Calories": { "N": 450 }, "PreparationTime": { "N": 30 } }, "item": { "Cost": { "N": 20 }, "DiscountPercentage": { "N": 10 }, "Category": { "N": "Sandwich" }, "DishName": { "N": "Vegan" }, "Calories": { "N": 300 }, "PreparationTime": { "N": 20 } } } {{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} Data items that do not contain the partition key of an index are skipped from being indexed. In this example, the item identified by "Pizza" and "Vegan" from the main table is not indexed because it does not include the value for the index's partition key, {{%badge%}}Cost{{%/badge%}}. {{%/note%}} When you execute a query based on the index Pricing, Catalyst will search for items against the attribute {{%badge%}}Cost{{%/badge%}} and will sort the results based on the attribute {{%badge%}}DiscountPercentage{{%/badge%}} if more that one result matches. The selected attributes ({{%badge%}}Calories{{%/badge%}} and {{%badge%}}PreparationTime{{%/badge%}}) will be returned in the query for the matching items, along with the primary keys of the table and the index. -------------------------------------------------------------------------------- title: "Create and Manage Indexes" description: "Catalyst NoSQL is a fully-managed, powerful database that provides you with a non-relational, non-SQL means of data storage. Create, manage, and query data in NoSQL tables with ease, and perform CRUD operations in Java, Node.js, and Python." last_updated: "2026-03-18T07:41:08.534Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/indexing/create-manage-indexes/" service: "Cloud Scale" -------------------------------------------------------------------------------- # Create and Manage Indexes Let's look at creating and working with indexes in your NoSQL table in the Catalyst console. {{%note%}}{{%bold%}}Note:{{%/bold%}} The configurations made in this section, such as creating and managing indexes, can only be done from the remote console, and not through the SDKs or API. You can perform data operations from the server-side SDKs and API.{{%/note%}} ### Create an Index To create an index for a NoSQL table in your project: 1. Navigate to the {{%italics%}}Indexes{{%/italics%}} section of the table from the NoSQL component, then click {{%bold%}}Add Index{{%/bold%}}. 2. Enter a name for the index. You must configure the {{%link href="/en/cloud-scale/help/nosql/components/#table-keys" %}}{{%italics%}}Partition Key{{%/italics%}}{{%/link%}} for the index by providing a key name and selecting the {{%link href="/en/cloud-scale/help/nosql/working-with-data/introduction/#supported-data-types" %}}data type{{%/link%}} of the key. {{%note%}}{{%bold%}}Note:{{%/bold%}} You will not be able to modify or delete the {{%italics%}}Partition Key{{%/italics%}} of the index, after you configure it. {{%/note%}} 3. You can optionally configure a {{%link href="/en/cloud-scale/help/nosql/components/#table-keys" %}}{{%italics%}}Sort Key{{%/italics%}}{{%/link%}} if you require for the index by selecting {{%bold%}}Yes{{%/bold%}} for "Include Sort Key?". However, if you only prefer having the partition key, then select {{%bold%}}No{{%/bold%}}. If you include a sort key, enter the key name and select the data type of the key. {{%note%}}{{%bold%}}Note:{{%/bold%}} You will not be able to modify or delete the {{%italics%}}Sort Key{{%/italics%}} of the index, after you configure it.{{%/note%}} 4. Select an {{%link href="/en/cloud-scale/help/nosql/indexing/introduction/#index-types" %}}{{%italics%}}Attribute Type{{%/italics%}}{{%/link%}} for the index. If you select {{%bold%}}Include Columns{{%/bold%}}, specify the attributes to index. Catalyst will enable you to add multiple attributes in the window. You can click (-) to remove an attribute. 5. After you configure the index, click {{%bold%}}Create{{%/bold%}}. The index for your NoSQL table will be created and listed in the {{%italics%}}Indexes{{%/italics%}} section. Catalyst will automatically create a {{%bold%}}unique Index ID{{%/bold%}} for your index that you can use to refer it while performing SDK and API actions. <br> ### The Index Section The {{%italics%}}Index{{%/italics%}} section provides a glimpse of all the indexes configured for a particular table and their details. It displays essential information, such as the unique Index ID, the partition key and sort key configured for it, and the size and the number of items in the index. An empty table will contain 0 bytes and 0 data items. Catalyst operates a built-in scheduler once every 24 hours that calculates and updates the {{%italics%}}Storage Size{{%/italics%}} and {{%italics%}}No. of Items{{%/italics%}} of each index. For the indexes created for specific attributes, the index section will display a {{%bold%}}View{{%/bold%}} button to display all attributes that are indexed. You can view the attributes by clicking it. <br> ### Edit an Index You can edit an index created for a table in NoSQL to modify the index name. However, you will not be able to modify the partition key, sort key, or attribute types that you configured for it. To edit the index of a table: 1. Click the ellipsis icon for the index in the {{%italics%}}Indexes{{%/italics%}} section, then click {{%bold%}}Edit{{%/bold%}}. <br> 2. Modify the index name, then click {{%bold%}}Update{{%/bold%}}. <br> ### Delete an Index You can permanently delete the index of a table in NoSQL. This will delete it from the storage and you will no longer be able to execute queries based on the index. To permanently delete an index of a NoSQL table: 1. Click the ellipsis icon for the index in {{%italics%}}Indexes{{%/italics%}} section, then click {{%bold%}}Delete{{%/bold%}}. <br> 2. Click {{%bold%}}Delete{{%/bold%}} in the confirmation pop-up.