Match_phrase_prefix NOT working as expected for other languages

Elasticsearch version ( bin/elasticsearch --version ): latest version

Plugins installed : [NA]

JVM version ( java -version ):1.8

OS version ( uname -a if on a Unix-like system): ubuntu-latest

Description of the problem including expected versus actual behavior :

match_phrase_prefix NOT working as expected for other languages
when in insert below words;
"word" : "க்ஷுத்ரஸ்வாஸம்"
"word" : "க்ஷேத்திரம்"
"word" : "க்ஷேமதண்டுலம்"
and try to search with character "க்" it is returning above word's --> which is not expected.
Please follow below easy step to reproduce,
please help on how to resolve this issue.....

example:-
"க்ஷேத்திரம்" -->unicode rep.







ி



Steps to reproduce :

Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

  1. create index as given.
    2.insert data
    3.run search
  2. create index as given.

PUT /tamil_example
{
"settings": {
"analysis": {
"filter": {
"tamil_stop": {
"type": "stop",
"stopwords": " none "
},
"tamil_keywords": {
"type": "keyword_marker",
"keywords":
},
"tamil_stemmer": {
"type": "stemmer",
"language": "minimal_english"
}
},
"analyzer": {
"tamil_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"decimal_digit",
"tamil_keywords",
"indic_normalization",
"tamil_stop",
"tamil_stemmer"
]
}
}
}
},
"mappings": {
"_doc": {
"properties": {
"word": {
"type": "text",
"analyzer": "tamil_analyzer"
}
}
}
}
}

2.insert data

PUT tamil_example/_doc/1
{
"word" : "க்ஷுத்ரஸ்வாஸம்"
}
PUT tamil_example/_doc/2
{
"word" : "க்ஷேத்திரம்"
}
PUT tamil_example/_doc/3
{
"word" : "க்ஷேமதண்டுலம்"
}

3.run search :-
GET tamil_example/_search
{
"query": {
"match_phrase_prefix": {
"word": "க்"
}
}
}
Out put ------> Below output is NOT expected., it should return empty search.
{
"took" : 6,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 3,
"max_score" : 0.2876821,
"hits" : [
{
"_index" : "tamil_example",
"_type" : "_doc",
"_id" : "2",
"_score" : 0.2876821,
"_source" : {
"word" : "க்ஷேத்திரம்"
}
},
{
"_index" : "tamil_example",
"_type" : "_doc",
"_id" : "1",
"_score" : 0.2876821,
"_source" : {
"word" : "க்ஷுத்ரஸ்வாஸம்"
}
},
{
"_index" : "tamil_example",
"_type" : "_doc",
"_id" : "3",
"_score" : 0.2876821,
"_source" : {
"word" : "க்ஷேமதண்டுலம்"
}
}
]
}
}

Provide logs (if relevant) :

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