Avoid PutMapping in NestedConventions

Fixed in

EPiServer.Find 13.2.0

Created

Jun 29, 2018

Updated

Jun 12, 2019

State

Closed, Fixed and tested


Description

Background: Each time a nested convention is registered, the API puts a mapping to the Find backend. This seems to be a heavy operation for ES, since if the cluster is under the slightest stress, the request results in a 503 from Find.

Every commerce installation registers at least three nested conventions. If one of these fails, it can cause the search to stop working and, in the worst case, no products are shown on the site.

Solution: If a nested convention is registered, we should first make a get mapping of the NestedDummyObject$$nested and check if the nested field already exists. Only if it is absent should the mapping be put.