Skip to content

Commit 3fce58e

Browse files
committed
bugfix: geo-ip index creation
1 parent 56bc88e commit 3fce58e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

installer/search.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ func InitOpenSearch() error {
3131
JSON: map[string]interface{}{
3232
"type": "fs",
3333
"settings": map[string]interface{}{
34-
"location": "/usr/share/opensearch/.utm-geoip/",
35-
"readonly": true,
34+
"location": "/usr/share/opensearch/.utm_geoip/",
35+
"compress": true,
3636
},
3737
},
3838
})
@@ -56,9 +56,10 @@ func InitOpenSearch() error {
5656
return err
5757
}
5858

59-
_, err = grequests.Post(baseURL+"_snapshot/.utm_geoip/.utm-geoip/_restore?wait_for_completion=true", &grequests.RequestOptions{
59+
_, err = grequests.Post(baseURL+"_snapshot/.utm_geoip/.utm_geoip/_restore", &grequests.RequestOptions{
6060
JSON: map[string]interface{}{
61-
"indices": ".utm-geoip",
61+
"indices": ".utm-geoip",
62+
"include_global_state": false,
6263
},
6364
})
6465
if err != nil {

0 commit comments

Comments
 (0)