You don’t use the dot notation in the mappings- ‘elementType’ is declared as type nested then you have a ‘properties’ field at the same level to declare the fields it holds eg “entity”.
Before you do - are you sure you need the overhead of nested docs? If the objects only have one property (“name”) there’s no need for a nested doc. See this flowchart