Imagine i have some document that has relations to other type of document, say, building that is related to regions:
building:
country: region
city: region
nearbyParks: [region]
closestNuclearHideout: region
I need to be able to perform a search by any region that is related to building, so i'm converting this structure to:
building:
countryId: <uuid>
cityId: <uuid>
nearbyParkIds: [<uuid>]
closestNuclearHideoutId: <uuid>
regions: [region]
However, by this very moment i need to perform searches only by related region id, and would love to forbid ElasticSearch to index every regions.* field (except for regions.id) to keep things clean. Is this possible using current mapping API? I would love to keep my elastic documents as small as possible and also keep them in sync with backend output, so adding regionIds uuid array field is an option, but an unwanted one.