Skip to content

Instantly share code, notes, and snippets.

@niranjan-uma-shankar
Created August 16, 2012 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niranjan-uma-shankar/3374333 to your computer and use it in GitHub Desktop.
Save niranjan-uma-shankar/3374333 to your computer and use it in GitHub Desktop.
curl -XGET 'http://localhost:9200/ninja/interests/_search?pretty=true' -d '
{
"query":{
"query_string":{"query":"bas"}
},
"highlight" : {
"fields" : {
"name":{}
}
}
}'
{
"took" : 11,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 7,
"max_score" : 0.25947437,
"hits" : [ {
"_index" : "ninja",
"_type" : "interests",
"_id" : "501a30e7db1bc0d03b000001",
"_score" : 0.25947437, "_source" : {"name": "play basketball", "tags": ["basketball", "sports"], "uri": "play-basketball", "plans_count": 1, "is_indexed": 1, "people_interested_count": 8, "people_interested": [2, 295, 305, 64, 349, 140, 106, 422], "interest_id": 24.0, "plans": [{"plan_id": "4fbbbc04db1bc0d12b000000"}]},
"highlight" : {
"name" : [ "play <em>basketba</em>ll" ]
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment