Created
April 28, 2013 09:00
-
-
Save radu-gheorghe/5476348 to your computer and use it in GitHub Desktop.
Elasticsearch should still show scores for each hit when sorting on a field and track_scores is true
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 localhost:9200/test | |
curl -XPUT localhost:9200/test/test/1 -d '{"foo": "bar"}' | |
curl -XPOST localhost:9200/test/_refresh | |
echo | |
echo "===============" | |
echo -e "\e[00;32mCORRECT: SCORE IS SHOWN WHEN SORTING ON SCORE\e[00m" | |
echo "===============" | |
curl 'localhost:9200/test/test/_search?q=bar&pretty' 2>/dev/null | grep score | |
echo | |
echo "===============" | |
echo -e "\e[00;32mCORRECT: SCORE IS NOT SHOWN WHEN SORTING ON FIELD\e[00m" | |
echo "===============" | |
curl 'localhost:9200/test/test/_search?q=bar&sort=foo&pretty' 2>/dev/null | grep score | |
echo | |
echo "===============" | |
echo -e "\e[00;31mINCORRECT: SCORE IS NOT SHOWN WHEN SORTING ON FIELD WITH TRACK_SCORES\e[00m" | |
echo "===============" | |
curl 'localhost:9200/test/test/_search?q=bar&sort=foo&track_scores=true&pretty' 2>/dev/null | grep score |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment