# Trouver boulangerie en recherchant boulan

**URL:** https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610
**Category:** Discussions en français
**Created:** [April 30, 2020, 6:16pm UTC](https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610 "2020-04-30T18:16:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jfsenechal](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jfsenechal](https://discuss.elastic.co/u/jfsenechal)
#### Post date: [April 30, 2020, 6:16pm UTC](https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610/1 "2020-04-30T18:16:02Z")

</div>

Hello

J'essaie de trouver comment on fait une recherche en écrivant partiellement un mot

boulan =\> boulangerie  
manda =\> mandabar

Mon  
[schéma](https://github.com/acmarche/bottin/blob/master/config/elastic/settings.json)

Peut être dois je travailler avec le [tokenizer ngram](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-ngram-tokenizer.html)

```auto
GET bottin/_search
{
  "query": { 
  "match": {
          "societe": "boulan"
  }
  }
}

```

Merci

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [April 30, 2020, 6:37pm UTC](https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610/2 "2020-04-30T18:37:32Z")

</div>

Je te partage ces 2 liens pour voir si ça corresponds a le typologie de recherche que tu voudrais obtenir:

- [https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-as-you-type.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-as-you-type.html)
- [https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-suggesters.html#completion-suggester](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-suggesters.html#completion-suggester)

---

<div class="post-metadata">

### Author: ![ahmed\_charafouddine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_charafouddine/32/45129_2.png) [@ahmed\_charafouddine](https://discuss.elastic.co/u/ahmed_charafouddine)
#### Post date: [April 30, 2020, 6:44pm UTC](https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610/3 "2020-04-30T18:44:02Z")

</div>

Je pense que tu peux utiliser les synonymes.

---

<div class="post-metadata">

### Author: ![jfsenechal](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jfsenechal](https://discuss.elastic.co/u/jfsenechal)
#### Post date: [April 30, 2020, 6:54pm UTC](https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610/4 "2020-04-30T18:54:12Z")

</div>

Waouw les réponses rapides 🙂

J'ai continuer à chercher, et j'ai ajouté dans mon schéma un champ de type ngram et ça fonctionne 🙂

[schema](https://github.com/acmarche/bottin/blob/master/config/elastic/settings.json#L64)

[mapping](https://github.com/acmarche/bottin/blob/master/config/elastic/mappings.json#L40)

---

<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: [May 28, 2020, 6:54pm UTC](https://discuss.elastic.co/t/trouver-boulangerie-en-recherchant-boulan/230610/5 "2020-05-28T18:54:13Z")

</div>

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