Created
August 13, 2013 21:02
-
-
Save nik9000/6225677 to your computer and use it in GitHub Desktop.
Phrase queries from query strings ignore boosts
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/test?pretty" | |
curl -XPOST "http://localhost:9200/test?pretty" -d '{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
} | |
} | |
}' | |
curl -XGET 'http://localhost:9200/_cluster/health?pretty=true&wait_for_status=yellow' | |
curl -XPOST "http://localhost:9200/test/test?pretty" -d '{"important": "phrase match", "less_important": "junk"}' | |
curl -XPOST "http://localhost:9200/test/test?pretty" -d '{"important": "not good", "less_important": "phrase match"}' | |
curl -XPOST 'http://localhost:9200/test/_refresh?pretty' | |
curl -XGET "http://localhost:9200/test/test/_search?pretty" -d '{ | |
"query": { | |
"query_string": { | |
"query": "\"phrase match\"", | |
"fields": [ "important^10.0", "less_important" ], | |
"auto_generate_phrase_queries": true | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment