Create a Child Field
- how-to
Create a child field with the Couchbase Server Web Console to add or remove a specific field’s content from a Search index.
Prerequisites
-
You have the Search Service enabled on a node in your database. For more information about how to deploy a new node and Services on your database, see Manage Nodes and Clusters.
-
You have created an index. For more information, see Create a Basic Search Index with the Web Console.
-
You have created a type mapping. For more information about how to create a type mapping on an index, see Create a Type Mapping.
-
You have logged in to the Couchbase Server Web Console.
Procedure
To add or remove a child field from a Search index with the Couchbase Server Web Console:
-
Go to Search.
-
Click the index where you want to create a child field.
-
Click Edit.
-
Expand
. -
Point to an existing mapping and click +.
-
Click insert child field.
-
In the Field field, enter the name of a field in your documents that you want to add or remove from the index.
The field must contain either a single value or an array. If the field contains a JSON object, create a child mapping instead. Field names must not contain periods ( .
). -
In the Type list, select the data type for the field.
For more information about the available data types, see Field Data Types.
-
Configure optional settings for the child field.
For more information about the available settings for child fields, see Child Field Options.
-
Click OK.
Next Steps
You can continue to create child fields to add or remove the contents of a document from your Search index.
If a field in your documents contains a JSON object, Create a Child Mapping, instead.
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.