elastic_tutorial/The Elasticsearch Documentation/4_advanced/4_setting_Index.es
2025-04-09 09:37:23 +03:30

18 lines
1009 B
JavaScript
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 detail-v01
{
"mappings": {
"date_detection": false
},
"settings": {
"number_of_shards": "1",
"number_of_replicas": "0"
}
}
// date_detection --> الاستیک سرچ در حالت عادی از روی اسم فیلد هعا نوع داده را تشخیص میدهد
// مثلا اگر اسم فیلد date باشد حتی اگر تایپش text تعریف شده باشد، سعی میکند date4 در نظر بگیرد و در صورت استاندارد نبودن date به خطا میخورد
// "date_detection": false جلوی این مشکل را میگیرد
// number_of_shards --> گیت هاب یک سیستم کنترل ابری سرور بزرگ دارد که قسمت هایی از داده های شما را بین سرور ها پخش میکند، این تعداد بخش هایی است
// که جدا میشوند
// number_of_replicas --> این تعداد تکرار بخش های تعریف شده است
// Note: دیفالت number_of_shards 1 نیست