# Need help to properly map French cities for multi fields search and autocomplete

**URL:** <https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480>\
**Category:** Elasticsearch\
**Created:** [July 15, 2019, 9:46am UTC](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480 "2019-07-15T09:46:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatriceMarin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patricemarin/32/50133_2.png) [@PatriceMarin](https://discuss.elastic.co/u/PatriceMarin)\
**Post date:** [July 15, 2019, 9:46am UTC](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480/1 "2019-07-15T09:46:03Z")

</div>

Hi,

I'm currently working on French geolocation data.

Here is my model:

```
public class Ville
    {
        public Guid Id { get; set; }

        public string Name { get; set; }

        public string ZipCode { get; set; }

        public string[] MultilpleZipCopde { get; set; }
        
        public GeoLocation Centroide { get; set; }
        
        public GeoLocation Min { get; set; }
        
        public GeoLocation Max { get; set; }
    }

```

I need to be able to perform quick search such as:

- search by name

- search by zip code

- perform autocomplete

I've facing some issues with:

- the French language when there is an accent in the city name

- the search on the zip code, the result of my search is empty when I set a zip code

I'm using ElasticSearch v7.2, .netCore, C#, Nest v7.0.1

Can someone give me a proper way to design my index's mapping & settings, please ?  
I appreciate your help.

Thanks in advance,

Patrice

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 15, 2019, 9:58am UTC](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480/2 "2019-07-15T09:58:16Z")

</div>

You can use the `french` analyzer or add an asciifolding token filter if you are using custom analyzer.

I wrote some examples at the end of this gist:

> <https://gist.github.com/dadoonet/f911291c4dd19b0802031db3064c648f>

HTH

---

<div class="post-metadata">

**Author:** ![PatriceMarin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patricemarin/32/50133_2.png) [@PatriceMarin](https://discuss.elastic.co/u/PatriceMarin)\
**Post date:** [July 15, 2019, 1:52pm UTC](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480/3 "2019-07-15T13:52:59Z")

</div>

Hi David,

Thanks for your quick reply. Your examples help me a lot.  
I'm now able to search by name or zip code, even with accents!! 😉

Thanks again!! 🙂

Patrice

---

<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:** [August 12, 2019, 1:53pm UTC](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480/4 "2019-08-12T13:53:02Z")

</div>

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