elastic_tutorial/The Elasticsearch Documentation/8_analyzer/2_analysis.es
2025-04-09 09:37:23 +03:30

84 lines
2.3 KiB
Erlang
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PUT /firstindex
{
"settings": {
"index": {
"analysis": {
"filter": {
"MyName": {
"type": "synonym",
"lenient": true,
"_comment": "نعيم, حميد => نعيم",
"synonyms": [
"آب زي, آبزي => آب زي",
"آرامش بخش, آرامش‌بخش => آرامش بخش",
"شوقي, شوق => شوق",
"مقصودشان, مقصود => مقصود",
"عفاهما, عفا => عفا",
"عفاتك, عفا => عفا",
"عقالاته, عقال => عقال"
]
}
}
}
}
}
}
// Type: synonym
// کلمات مترادف
// کلمات نعیم و حمید با هم مترادف هستند و باهم جایگزین میشوند(حمید بغا نعیم جایگزین میشود)
// MyName -> your name
PUT /firstindex
{
"settings": {
"index": {
"analysis": {
"filter": {
"arabic_stop": {
"type": "stop",
"stopwords": [
"1",
"2",
"3",
"ص",
"4",
"و",
"5",
"ج",
"6",
"a"
]
}
}
}
}
}
}
// کلماتی که حذف میشود
PUT /firstindex
{
"settings": {
"index": {
"analysis": {
"char_filter": {
"persian_char_filter": {
"type": "mapping",
"mappings": [
"٠ => 0",
"١ => 1",
"٢ => 2",
"٣ => 3",
"٤ => 4"
]
}
}
}
}
}
}
// تبدیل کاراکتر ها