Skip to main content

2 posts tagged with "mappings"

View All Tags

Text Analyzers and Custom Mappings in OpenSearch

· 7 min read
FoundryDB Team
Engineering @ FoundryDB

The analyzer you assign to a field determines how text is broken into tokens at index time and at query time. Choosing the wrong one produces surprising results: searches that miss obvious matches, or matches that should not have ranked at all. This post compares the built-in English and standard analyzers, then builds a custom analyzer with synonym support.

All examples were tested against OpenSearch 2.19.1 on FoundryDB staging.

Zero-Downtime Reindexing in OpenSearch with Aliases

· 5 min read
FoundryDB Team
Engineering @ FoundryDB

OpenSearch index mappings are immutable once data is indexed. Changing a field type (for example, from text to keyword for a product SKU) or adding an analyzer to an existing field requires creating a new index and moving data into it. The challenge is doing this without taking your search API offline. The answer is aliases combined with the _reindex API. This post demonstrates the full pattern on a live OpenSearch 2.19.1 cluster managed by FoundryDB.

All commands use YOUR_OPENSEARCH_HOST and YOUR_PASSWORD as placeholders.