Created
June 20, 2011 11:21
-
-
Save karussell/1035458 to your computer and use it in GitHub Desktop.
ElasticSearch boost + match all 1019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'http://localhost:9200/twitter/' | |
# mapping for article includes | |
# "properties" : { "_boost" : { "type" : "float", "name" : "_boost", "null_value" : 1.0}, ... | |
curl -XPUT 'http://localhost:9200/twitter/article/1' -d '{ | |
"_boost" : 1.0 | |
}' | |
curl -XPUT 'http://localhost:9200/twitter/article/2' -d '{ | |
"_boost" : 10.0 | |
}' | |
curl -XPUT 'http://localhost:9200/twitter/article/3' -d '{ | |
"_boost" : 3.0 | |
}' | |
curl -XPOST 'http://localhost:9200/twitter/_refresh' | |
curl -XPOST 'http://localhost:9200/twitter/_search?pretty=true' -d '{ | |
"query":{"match_all": { "norms_field" : "_boost" } | |
}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment