Closed r-nikhil closed 5 years ago
Sorry about the weird indentation. I was writing this while I was on my way back to college. Would format it properly from now.
I have corrected a lot of above mentioned things with the last few commits. Please review them too :)
I changed the table names, implemented an example and then made a commit.
@DhavalKapil . Can you please point me toward the endpoint I have to access to update the cluster name ? 'client.cluster.putSettings' takes only 'flat_settings' as parameter. Which method is used for the cluster update api ?
I also mailed you regarding this :)
@rnikhil275 Cluster name is not dynamically updateable. So the only way to update it is by editing elasticsearch.yml
before starting the elasticsearch server.
Otherwise, to update dynamic settings, use client.cluster.putSettings()
endpoint. The settings which you have to update is passed in the body
. Refer to this for complete documentation.
A sample example:
curl -XPUT localhost:9200/_cluster/settings -d '{
"persistent" : {
"discovery.zen.minimum_master_nodes" : 2
}
}'
boils down to the following lua code:
local res, err = client.cluster.putSettings(
body = {
persistent = {
["discovery.zen.minimum_master_nodes"] = 2
}
}
}
I didn't get any email from you. My email address is: me@dhavalkapil.com
I was referring to the same example. Anyway, I added support for accessing the "namespaces". I wrongly assumed that "flat_settings" was the only parameter from reading the source file.
Also, I did mail you. It's there in my sent items. I mailed from rnikhil96@outlook.com
https://luarocks.org/modules/dhavalkapil/elasticsearch will block the worker running over openresty/nginx. You can see more in https://github.com/DhavalKapil/elasticsearch-lua/pull/11
@CriztianiX there have been some confusion regarding nginx, some other sources suggest no error. Anyways I'm working on a new release for elasticsearch
. Your fix shall be incorporated with minor edits :) I'm not sure whether someone has already tested elasticsearch + nginx concerning sailor or not?
Coverage decreased (-0.1%) to 82.66% when pulling 37fbde57cc4ccb75c2c77b7abe5b004109a7815c on rnikhil275:elasticsearch into a8e470b6c6a54064287cfc0e31623db253e9f85a on sailorproject:master.