Managing indexes for Cloudant native queries

You can add, edit, or remove indexes for Cloudant native queries.

Before you begin

Open a Cloudant native query on the Build tab of the Cloudant Native Query editor.

About this task

To define an index, complete the following steps:

Procedure

  1. From the main menu, to open the Manage Indexes dialog, select Query > Manage Indexes.
  2. To open the Manage Index dialog, click Add Index.
  3. In the Manage Index dialog, specify the name that you want to use for the index.
  4. To specify the name of the field that you want to include to the index from database documents, click Add Filed. You can specify multiple field names.
  5. When you specified all fields that you want to index, click OK.
    The index that you created is added to the Index names list of the Manage Indexes dialog. The fields that you specified for including in the index are displayed in the Fields section.
  6. To edit an index, select the required index from the Index names list, and then click Edit Index.
  7. To delete an index, select the index from the Index names list, and then click Remove Index.
    Note: The Manage Indexes dialog contains the service index with the name _all_docs that cannot be edited or removed.
  8. To close the Manage Indexes dialog and return to the Cloudant Native Query editor, click OK.

Results

The indexes that you added for Cloudant native queries are included in the Query Indexes folder under the appropriate design document node in the Repository Explorer view.