Created
May 11, 2012 11:00
-
-
Save robyoung/2658979 to your computer and use it in GitHub Desktop.
Elasticsearch Autocomplete Query
This file contains hidden or 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 -X GET "http://localhost:9200/licence-finder/_search?pretty=true" -d '{"query":{"query_string":{"query":"title.autocomplete:organ*"}},"sort":[{"title.sortable":"asc"}]}' | |
{ | |
"took" : 72, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 5, | |
"successful" : 5, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 1, | |
"max_score" : null, | |
"hits" : [ { | |
"_index" : "licence-finder", | |
"_type" : "sector", | |
"_id" : "VOLib5RGSwqY7x9dGvSUHw", | |
"_score" : null, "_source" : {"type":"sector","public_id":1000359,"title":"Event organisation and management"}, | |
"sort" : [ "event organisation and management" ] | |
} ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment