Create a Custom Analyzer
- Capella Operational
- how-to
Create a custom analyzer with the Couchbase Capella UI’s Advanced Mode to modify the input text from a Search query or Search index and improve search results. For more information, see Search Index Features.
You must use Advanced Mode to add a custom analyzer to your Search index. For more information, see Advanced Mode Editing. |
Prerequisites
-
You have the Search Service enabled on a node in your operational cluster. For more information about how to change Services on your operational cluster, see Modify a Paid Cluster.
-
You have logged in to the Couchbase Capella UI.
Procedure
To create a custom analyzer with the Capella UI in Advanced Mode:
-
On the Operational Clusters page, select the operational cluster where you want to work with the Search Service.
-
Go to
. -
Do one of the following:
-
To work with an existing Search index, click the name of the index where you want to create a custom analyzer.
-
To create a new Search index, click Create Search Index.
-
-
Make sure to select Enable Advanced Options.
-
Expand Global Index Settings.
-
Click Add Custom Analyzer.
-
In the Analyzer Name field, enter a name for the new custom analyzer.
-
Click Add Custom Analyzer.
Configure Analyzer Components
For more information about analyzers and their components, see Analyzers.
Add the following components to a custom analyzer to take input text from a document or Search query and convert it into tokens:
Configure Tokenizers
For more information about tokenizers, see Tokenizers.
To configure the tokenizer for a custom analyzer:
-
(Optional) Create a custom tokenizer. For more information, see Create a Custom Tokenizer.
-
In the Tokenizer list, select a tokenizer to use in your custom analyzer. You can choose your custom tokenizer or use a default tokenizer.
Configure Character Filters
For more information about character filters, see Character Filters.
To add a character filter or character filters to a custom analyzer:
-
(Optional) Create 1 or more custom character filters. For more information, see Create a Custom Character Filter.
-
In the Character Filters list, select 1 or more character filters to use in your custom analyzer. You can choose your custom character filter or use the default character filters.
Remove a character filter from your custom analyzer by clicking the x next to a listed filter.
Configure Token Filters
For more information about token filters, see Token Filters.
To add a token filter or token filters to a custom analyzer:
-
(Optional) Create 1 or more custom token filters. For more information, see Create a Custom Token Filter.
-
In the Token Filters list, select 1 or more token filters to use in your custom analyzer. You can choose your custom token filter or use the default token filters.
Remove a token filter from your custom analyzer by clicking the x next to a listed filter.
Next Steps
After you create a custom analyzer, you can set it as the default analyzer for your Search index.
You can also use the custom analyzer when you create a type mapping or mapping while you Create a Search Index with the Capella UI.
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 Capella UI.