# Exact match with multiple names from OSM elements

**URL:** <https://discuss.elastic.co/t/exact-match-with-multiple-names-from-osm-elements/250257>\
**Category:** Elasticsearch\
**Created:** [September 28, 2020, 7:17pm UTC](https://discuss.elastic.co/t/exact-match-with-multiple-names-from-osm-elements/250257 "2020-09-28T19:17:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarelM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harelm/32/11740_2.png) [@HarelM](https://discuss.elastic.co/u/HarelM)\
**Post date:** [September 28, 2020, 7:17pm UTC](https://discuss.elastic.co/t/exact-match-with-multiple-names-from-osm-elements/250257/1 "2020-09-28T19:17:29Z")

</div>

OK, so this might be a long intro but stay with me...  
I've built a OSM names search engine, a bit like Nominatim, but better (at least for my site's needs).  
I'm basically indexing everything that has a name in OSM.  
The problem is that element in OSM may have more than one name.  
So I accumulate them into arrays by their language key.  
This is working fine so far and the search is working for things that interests the users of my site (i.e. outdoor stuff) by adding a boost for those things.  
The results can be seen here:  
[https://israelhiking.osm.org.il/](https://israelhiking.osm.org.il/)  
The problem I'm facing is that I don't know how to do an exact match to a filed that can contain multiple names, which are all for the same entity.  
I mean I probably need to change the mapping, adding an exact match field and disable norms, but I'm missing a solution for the multiple names...  
Any help would be appreciated.

Search code can be found here:

> <https://github.com/IsraelHikingMap/Site/blob/4fe9c1c5fb8c318c0350bae2aac5a03a4a2d52ce/IsraelHiking.DataAccess/ElasticSearchGateway.cs#L219>

  
Mapping can be found here:  

> <https://github.com/IsraelHikingMap/Site/blob/4fe9c1c5fb8c318c0350bae2aac5a03a4a2d52ce/IsraelHiking.DataAccess/ElasticSearchGateway.cs#L510>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 26, 2020, 7:17pm UTC](https://discuss.elastic.co/t/exact-match-with-multiple-names-from-osm-elements/250257/2 "2020-10-26T19:17:30Z")

</div>

Closed on October 26, 2020, 7:17pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
