# Custom vector maps with accents

**URL:** <https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075>\
**Category:** Kibana\
**Created:** [August 6, 2019, 5:53pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075 "2019-08-06T17:53:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alder/32/58170_2.png) [@Alder](https://discuss.elastic.co/u/Alder)\
**Post date:** [August 6, 2019, 5:53pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/1 "2019-08-06T17:53:29Z")

</div>

Hello everyone,

I was able to configure my custom vector map with Brazilian cities.  
I have an index that one of the fields is the city and I was able to make a join between the index field and the custom vector map.  
But it didn't work for cities that have accents.

example:  
In my index has the city "Belem" and in the custom vector maps has the city "Belém"

How do I do to the join work with accented words?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [August 8, 2019, 12:02pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/2 "2019-08-08T12:02:56Z")

</div>

Hi @Alder

how exactly do you join the data? Could you provide your code and a few sample documents?

---

<div class="post-metadata">

**Author:** ![Alder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alder/32/58170_2.png) [@Alder](https://discuss.elastic.co/u/Alder)\
**Post date:** [August 8, 2019, 1:18pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/3 "2019-08-08T13:18:13Z")

</div>

I am using the "custom vectror shapes" of the "maps" feature. I attached an image with join. Cities that do not have accents are ok.  
The custom vector shape was built based on the file br\_muns.geojson from the link below:

[https://download2.exploratory.io/maps/br\_muns.zip](https://download2.exploratory.io/maps/br_muns.zip)

 ![imagem](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2a10e037e4464fab77be50c13bae6657b27a97af.png)

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [August 8, 2019, 1:46pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/4 "2019-08-08T13:46:45Z")

</div>

Hi @Alder,

The term-join uses an exact string match, and the city-name with an accent and the city-name without are different. This is why this is failing.

I would consider following work-arounds:

- Do you have an ID-field in your index that you can use to join on? That br\_muns.geojson file seems to have a few ID-fields. Are there matching ids in the documents of your index?
- Could you add a field to the features in br\_muns.geojson where all special characters are replaced? Here is an example in Javascript to replace accented characters with the unaccented one [https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463](https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463)

---

<div class="post-metadata">

**Author:** ![Alder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alder/32/58170_2.png) [@Alder](https://discuss.elastic.co/u/Alder)\
**Post date:** [August 8, 2019, 2:05pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/5 "2019-08-08T14:05:26Z")

</div>

Hi @thomasneirynck,

Thanks for the quick response and help.

I have normalized both my index and the file br\_muns.geojson with the code below and I think it will work now.

public static String removerAcentos(String str) {  
return Normalizer.normalize(str, Normalizer.Form.NFD).replaceAll("[^\p{ASCII}]", "");  
}

Thanks everyone from elasticteam.

---

<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:** [September 5, 2019, 2:05pm UTC](https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/6 "2019-09-05T14:05:30Z")

</div>

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