how to add shards
asoltec opened this issue · 5 comments
asoltec commented
'index' => [
'settings' => [
'number_of_shards' => 3,
"number_of_replicas" => 2,
],
], i try this code but not working
Jeroen-G commented
How would you do it without the package?
asoltec commented
in elastic dev tool
PUT /articles
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
},
"mappings": {
"properties": {
"body": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"id": {
"type": "long"
},
"lifespan": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"period": {
"type": "object"
},
"place": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
Jeroen-G commented
Ok, and where does it go wrong and how?
asoltec commented
when i use php artisan scout:import "App/Article". it's create for me an index but index created with number_of_shards = 1 and number_of_replicas = 0 , so i want to change number_of_replicas and number_of_shards to be 3 shards and 2 replica
Jeroen-G commented
You should debug that and see if you can find what it tries to tell Elastic. We can work from there.