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
-
From the main menu, to open the Manage Indexes dialog, select .
-
To open the Manage Index dialog, click Add
Index.
-
In the Manage Index dialog, specify the name that you want to use for
the index.
-
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.
-
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.
-
To edit an index, select the required index from the Index names list,
and then click Edit Index.
-
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.
-
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.