Mapping size troubleshooting
Actions should be taken when you have trouble with mapping size
From FIND version 16.x we’ve provided a dashboard on FIND UI that lets you monitor your mappings on FIND service, please take care of your mappings proactively.
Please go to Search & Navigation > Service Health menu, under the mapping dashboard a red line in the dashboard that shows you the limit of mappings, a notification will be pushed to the SearchAdmin role if it exceeds or nearly exceeds the limitation.
We suggest some methods to reduce your mapping in best practice or actions should be taken if you see your mapping size is large or growing quickly:
- Clear your data then reindex all if you’ve found something strange in your mapping size: The first and quick action for you is clear all mappings then reindex everything. Please go to Search & Navigation > Configure > Index then hit “Clear index” button, confirm “Clear content index” then reindex your site. This action will optimize your unused mapping properties.
- Avoid using dictionaries with dynamic data. Instead, using dictionaries with fixed key and multiple values.
For example: You have a dictionary with keys as product codes, you should add product codes to an array then create a dictionary with key “ProductCodes” containing an array of values. If you’ve had dictionaries with dynamic data before already, then you update your code base as suggested above, you should “Clear index” for cleaning old mappings. Otherwise, the old mappings never be cleared. - Avoid changing your class name, property name, or property type frequently. When you update the name, or field type (for example Amount field type changes from string to float) search engine will treat them as new type or new fields so it will add more mappings into search engine. If you are developing your site and did so, you should use “Clear index” functionality on FIND UI then reindexing your site.
- Exclude unnecessary fields of your data for indexing: By excluding fields of a type, those fields will not index to FIND and not searchable, but it will help your data more lightweight, and your bulk/search requests will be faster. For example:
SearchClient.Instance.Conventions
.ForInstancesOf<ArticlePage>()
.ExcludeField(f => f.ContentAreaCssClass)
.ExcludeFieldMatching(x => x.IsReference.Value);
- Always put [JsonIgnore] attribute in class properties that you’ve known it not relevant to your searchable data.
- Shorten your field name if applicable.
Updated about 1 month ago