Create a Custom Character Filter
- how-to
Create a custom character filter with the Couchbase Server Web Console to remove unwanted characters from a Search query or the contents of a Search index.
Prerequisites
-
You’ve created an index. For more information, see Create a Basic Search Index with the Web Console.
-
You’ve logged in to the Couchbase Server Web Console.
Procedure
To create a custom character filter with the Couchbase Server Web Console:
-
Go to Search.
-
Click the Search index where you want to create a custom character filter.
-
Click Edit.
-
Expand
. -
Click Add Character Filter.
-
In the Name field, enter a name for the character filter.
-
In the Regular Expression field, enter the regular expression for the character filter.
-
(Optional) In the Replacement field, enter a string that replaces any matches for the regular expression.
-
Click Save.
Next Steps
After you create a custom character filter, you can use it with a custom analyzer.
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.