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" : [ ]
}
}