Hi,
I am currently using the Metaphone analyzer and it is acting too ambiguous. For example, here is the result for Murder
using the _analyze
API.
{
"tokens": [
{
"token": "MRTR",
"start_offset": 0,
"end_offset": 8,
"type": "<ALPHANUM>",
"position": 0
}
]
}
Now, If I search for Mehtrotra
, the result is same, although the phonetics (pronounciations )of both are radically different. How do I make do of this?
Here is the settings I used while setting up the index:
{
"settings": {
"index": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"my_metaphone"
]
}
},
"filter": {
"my_metaphone": {
"type": "phonetic",
"encoder": "metaphone",
"replace": true
}
}
}
}
},
"mappings": {
"properties": {
"author": {
"type": "text",
"analyzer": "my_analyzer"
},
"bench": {
"type": "text",
"analyzer": "my_analyzer"
},
"citation": {
"type": "text"
},
"court": {
"type": "text"
},
"date": {
"type": "text"
},
"id_": {
"type": "text"
},
"verdict": {
"type": "text"
},
"title": {
"type": "text",
"analyzer": "my_analyzer",
"fields": {
"standard": {
"type": "text"
}
}
},
"content": {
"type": "text",
"analyzer": "my_analyzer",
"fields": {
"standard": {
"type": "text"
}
}
}
}
}
}
Thanks,