Skip to content

Instantly share code, notes, and snippets.

@hkorte
Created September 17, 2013 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkorte/6592245 to your computer and use it in GitHub Desktop.
Save hkorte/6592245 to your computer and use it in GitHub Desktop.
Defining a field as boost removes this field's properties. Thus, it is impossible to sort on the boost field.
curl -XDELETE 'http://localhost:9200/boosttest'
curl -XPOST 'http://localhost:9200/boosttest' -d '{
"mappings" : {
"withoutboost": {
"properties" : {
"my_boost":{
"type":"float"
}
}
},
"withboost": {
"_boost" : {
"name" : "my_boost",
"null_value" : 1.0
},
"properties" : {
"my_boost":{
"type":"float"
}
}
}
}
}'
curl -XGET 'http://localhost:9200/boosttest/withoutboost/_mapping?pretty=true'
curl -XGET 'http://localhost:9200/boosttest/withboost/_mapping?pretty=true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment