Created
September 20, 2013 14:26
-
-
Save evanwong/6638420 to your computer and use it in GitHub Desktop.
elasticsearch _score not matching explanation.value
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 -XGET localhost:9200/test/title/1/_explain -d '{ | |
"query": { | |
"multi_match": { | |
"query": "matching", | |
"fields": [ | |
"_all" | |
] | |
} | |
} | |
}' |
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 -XGET localhost:9200/test/title/_search -d '{ | |
"explain": true, | |
"query": { | |
"multi_match": { | |
"query": "matching", | |
"fields": [ | |
"_all" | |
] | |
} | |
} | |
}' |
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 -XPOST localhost:9200/test -d '{ | |
"mappings": { | |
"title": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"boost": 100 | |
} | |
} | |
} | |
} | |
}' | |
curl -XPOST localhost:9200/test/title/1 -d '{ | |
"name": "Score not matching title" | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The _explain call is returning "matched: false" which is not correct.
And the _search is actually returning result with the _score not matching the _explanation.value which is 0.