Hi,
I am working on ES 6.x i want to apply multiple analyzers to specific field. Any suggestions that i can implement.
Hi,
I am working on ES 6.x i want to apply multiple analyzers to specific field. Any suggestions that i can implement.
HI Anvesh,
For applying multiple analysers, I would recommend that you check out "multi fields". This allows you to analyze a field in as many ways as you'd like.
There's an example here:
https://www.elastic.co/guide/en/elasticsearch/reference/6.4/multi-fields.html
Where the city field is analyzed as both text and keyword. You can do the same thing with analyzers:
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"myfield": {
"type": "text",
"analyzer": "standard",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
}
}
}
}
}
}
}
In that case, the myfield field will be analyzed with two different analyzers ("standard" and "english")
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.