I have entries in my index like follows:
ID BuildingName Postalcode Type
1 ABCD 1234 1
2 ABCD 7890 1
I need to remove duplicates appearing in the 'BuildingName' field at search (not at index since you see they are two different entries) . Finally I only want to see (any of the buildings with the searched name)
ID BuildingName Postalcode Type
1 ABCD 1234 1
why I cannot use field collapsing/aggregation as described here (Remove duplicate documents from a search in Elasticsearch) -> because i need BuildingName to be n-gram analyzed and the field collapsing / aggregation works only on non analyzed fields.
Any way to accomplishing this? All help appreciated! Thanks!