Create a Search Index
- concept
Create a Search index to get started with the Search Service in your database.
You can create a Search index with:
If you’re new to developing with the Search Service, create a Search index with the UI. You can copy the Search index definition JSON payload from the UI to create your index with the REST API. |
Creating a Search Index with the Web Console
To create a basic Search index, provide the following information:
-
The name of the index.
-
The bucket where you want to create the index.
If you want to restrict the documents you add to an index, you can also:
-
Add child fields to add or remove document fields from the index.
After you create a Search index, the Search Service streams data from your chosen collection or collections, and any document mutations, into the index builder. Before your index finishes building, you can run a search and return partial results.
You can also customize a Search index to improve search results and performance. For more information about how you can customize a Search index with the Web Console, see Customize a Search Index with the Web Console.
Creating a Search Index with the Quick Editor
The Web Console also has a Quick Index editor.
You can use the Quick Index editor to create a Search index by selecting fields from a document from your database.
You can edit an index that you created with the Quick Index editor in the standard editor later. You can’t edit an index that you created with the standard editor in the Quick Index editor.
For more information about how to create an index with the Quick Index editor, see Create a Search Index with the Quick Editor.
Creating a Search Index with the REST API
You can create a Search index with the REST API through a JSON payload. Most properties in the JSON payload correspond to settings in the Web Console. You can also copy the Search index definition JSON payload from a Search index in the Web Console to use in a REST API call.
For more information about how to use the REST API to create a Search index, see Create a Search Index with the REST API and curl/HTTP.
For more information about the available properties for a Search index, see Search Index JSON Properties.