Setting settings?
See original GitHub issueHow can we use elasticsearch-js to set settings?
I assumed that this would work
var settings = {
"index":{
"analysis":{
"analyzer":{
"inurl_analyzer": {
"tokenizer":"ngram",
"filter":"lowercase"
}
},
"tokenizer":{
"ngram": {
"type": "ngram",
"min_gram": 3,
"max_gram": 50
}
}
}
}
};
client.indices.putSettings(settings, ...)
But then we get an error:
TypeError: Invalid index: expected be a comma seperated list, array, number or string.
When, this works flawlessly:
curl -X PUT "http://localhost:9200/superfeedr" -d '{
"settings":{
"index":{
"analysis":{
"analyzer":{
"inurl_analyzer": {
"tokenizer":"ngram",
"filter":"lowercase"
}
},
"tokenizer":{
"ngram": {
"type": "ngram",
"min_gram": 3,
"max_gram": 50
}
}
}
}
}
}'
Issue Analytics
- State:
- Created 9 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Settings App - Apps on Google Play
Different apps need different configurations and settings. This app help you to switch to different set of settings for your each of your...
Read more >Change settings quickly on your Android phone
From the top of your screen, swipe down twice. · At the bottom left, tap Edit . · Touch and hold the setting....
Read more >Setting vs Settings? Which one makes more sense in a ...
Setting is singular, so use it if you only have one thing to set. Settings is plural, so use it when you have...
Read more >Find settings on iPhone - Apple Support
In the Settings app , you can search for iPhone settings you want to change, such as your passcode, notification sounds, and more....
Read more >8 Hidden Android Settings You Should Change Right Now!
Android users, this video is for you. 8 hidden, cool Android settings that you should be changing right away and trust me, these...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, for posterity what worked was indeed creating the index, with a body:
The curl request is different because it specifies an index name. I expect you will get the same result if you tell the js client the index to work with: