Skip to content

Instantly share code, notes, and snippets.

@scuy
scuy / explain_zero_value.sh
Last active December 26, 2015 21:19
How to reproduce zero values for _explanation in elasticsearch.
# create index
curl -XPOST "http://localhost:9200/test"
# create mapping with name field boosted
curl -XPOST "http://localhost:9200/test/user/_mapping" -d '{
"user":{
"properties":{
"name":{
"type":"string",
"boost": 2.0