Skip to content

Instantly share code, notes, and snippets.

@martijnvg
Created December 11, 2012 15:53
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martijnvg/8285c42729f8a54c5fae to your computer and use it in GitHub Desktop.
Save martijnvg/8285c42729f8a54c5fae to your computer and use it in GitHub Desktop.
Updating non dynamic index properties in ES.
curl -XDELETE 'localhost:9200/indexname?pretty'
#Creating an index with the non dynamic property: 'index.cache.field.type'
curl -XPUT 'localhost:9200/indexname?pretty' -d '{
"settings" : {
"index.cache.field.type" : "soft"
}
}'
curl -XGET 'localhost:9200/indexname/_settings?pretty'
# Closing an open index, to allow non dynamic properties to be changed.
curl -XPOST 'localhost:9200/indexname/_close?pretty'
# Updating the field cache type to resident
curl -XPUT 'localhost:9200/indexname/_settings?pretty' -d '{
"index.cache.field.type" : "resident"
}'
# Opening the closed index. The new field cache type is active.
curl -XPOST 'localhost:9200/indexname/_open'
curl -XGET 'localhost:9200/indexname/_settings?pretty'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment