# Elasticsearch + Analyzer + English dataset + French query

**URL:** <https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432>\
**Category:** Elasticsearch\
**Created:** [March 6, 2020, 9:46am UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432 "2020-03-06T09:46:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yassine\_Nifa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yassine_nifa/32/63534_2.png) [@Yassine\_Nifa](https://discuss.elastic.co/u/Yassine_Nifa)\
**Post date:** [March 6, 2020, 9:46am UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/1 "2020-03-06T09:46:25Z")

</div>

Hey guys !

I created an attribute with `"annotated_text"` to be able to recognize some entities

```
"headline": {"type": "annotated_text", "analyzer":"analyzer_shingle"}

```

Now I can for example look for` "Turkey"` and it returns` [Turkey](Turkey & GPE)`

But if for example the user type "Turquie" (which is the french translation of the word Turkey), the elasticsearch returns nothing.

I would like to know if there is an option that allows us to look for `"Turquie"` and returns the same entitie `[Turkey](Turkey & GPE)`

Here is what I get when I look for `"Turkey"` :

```
GET newsfeeds/_search
{
  "query": {
    "term": {
        "headline": "Turkey" 
    }
  }
}

```

I get :

```
{
      "took" : 11,
      "timed_out" : false,
      "_shards" : {
        "total" : 1,
        "successful" : 1,
        "skipped" : 0,
        "failed" : 0
      },
      "hits" : {
        "total" : {
          "value" : 8,
          "relation" : "eq"
        },
        "max_score" : 4.584161,
        "hits" : [
          {
            "_index" : "newsfeeds",
            "_type" : "_doc",
            "_id" : "SB12019373229680514873104586239560012766084",
            "_score" : 4.584161,
            "_source" : {
              "headline" : """Refugees Stream Across [Turkey](Turkey&GPE), Trying to Enter the [EU](EU&ORG)

    """,
              "url" : "https://www.wsj.com/articles/refugees-stream-across-turkey-in-bid-to-enter-eu-a-baby-in-an-isotherm-bag-11583319603",
              "published" : "2020-03-04T12:36:00Z",
              "feedLink" : "http://online.wsj.com/page/2_0006.html",
              "tags" : [
                "Turkey",
                "EU"
              ]
            }
          },

```

When I search for `Turquie`

, I get :

```
 {
      "took" : 2,
      "timed_out" : false,
      "_shards" : {
        "total" : 1,
        "successful" : 1,
        "skipped" : 0,
        "failed" : 0
      },
      "hits" : {
        "total" : {
          "value" : 0,
          "relation" : "eq"
        },
        "max_score" : null,
        "hits" : []
      }
    }
```

---

<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:** [March 6, 2020, 10:32am UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/2 "2020-03-06T10:32:21Z")

</div>

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

---

<div class="post-metadata">

**Author:** ![Yassine\_Nifa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yassine_nifa/32/63534_2.png) [@Yassine\_Nifa](https://discuss.elastic.co/u/Yassine_Nifa)\
**Post date:** [March 6, 2020, 10:41am UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/3 "2020-03-06T10:41:03Z")

</div>

Thank you for the reply 🙂

I updated my post

---

<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:** [March 9, 2020, 3:52pm UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/4 "2020-03-09T15:52:39Z")

</div>

Thanks.

Don't use the citation icon for code but only `</>` icon. I updated your post.

I guess that you'd need to use synonyms may be to tell elasticsearch that `Turquie` and `Turkey` are the same text.

You can look at this: [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html)

May be that would help.

---

<div class="post-metadata">

**Author:** ![Yassine\_Nifa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yassine_nifa/32/63534_2.png) [@Yassine\_Nifa](https://discuss.elastic.co/u/Yassine_Nifa)\
**Post date:** [March 13, 2020, 1:43pm UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/5 "2020-03-13T13:43:47Z")

</div>

Yeah I did that before and it works but I will have to do this for all the world countries which is a little bit complicated

---

<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:** [March 15, 2020, 3:32am UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/6 "2020-03-15T03:32:35Z")

</div>

Yes. You might have to do some work to get that working.  
The number of countries is not that important though.

---

<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:** [April 12, 2020, 3:32am UTC](https://discuss.elastic.co/t/elasticsearch-analyzer-english-dataset-french-query/222432/7 "2020-04-12T03:32:36Z")

</div>

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