Create a Child Mapping
- how-to
Create a child mapping with the Couchbase Server Web Console to add or remove a field that contains a JSON object from a Search index.
Prerequisites
-
You’ve created an index. For more information, see Create a Basic Search Index with the Web Console.
-
You’ve created a type mapping. For more information about how to create a type mapping on an index, see Create a Type Mapping.
-
You’ve logged in to the Couchbase Server Web Console.
Procedure
To create a child mapping with the Couchbase Server Web Console:
-
Go to Search.
-
Click the index where you want to create a child mapping.
-
Click Edit.
-
Expand
. -
Point to an existing mapping and click +.
-
Click insert child mapping.
-
In the {} field, enter the name of a field in a document that contains a JSON object.
-
(Optional) To only index the fields you add to the child mapping, select only index specified fields.
-
(Optional) To set a different analyzer for the child mapping, in the Analyzer list, select an analyzer.
You can select a default analyzer or create your own.
-
Click OK.
Next Steps
After you create a child mapping, you can choose to add or remove fields in the JSON object from your Search index.
Both child mappings and type mappings use child fields to add and remove fields from a Search index.
For more information about how to add or remove fields from a mapping, see Create a Child Field.
To continue customizing your Search index, you can also:
To run a search and test the contents of your Search index, see Run A Simple Search with the Web Console or Run a Simple Search with the REST API and curl/HTTP.