Skip to content

Instantly share code, notes, and snippets.

@alexclare
Last active January 11, 2017 22:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexclare/449a13faa7b63ad71d2d7a65f774c18d to your computer and use it in GitHub Desktop.
Save alexclare/449a13faa7b63ad71d2d7a65f774c18d to your computer and use it in GitHub Desktop.

find the type of these expressions!
  expression
response["timed_out"]
response["hits"]
response["hits"]["total"]
response["hits"]["hits"]
response["hits"]["hits"][0]
response["hits"]["hits"][0]["_score"]
response["hits"]["hits"][0]["_type"]
response["hits"]["hits"][0]["_source"]
response["hits"]["hits"][0]["_source"]["type"]
response["hits"]["hits"][0]["_source"]["slug"]
response["hits"]["hits"][0]["_source"]["images"]
response["hits"]["hits"][0]["_source"]["images"]["downsized"]
response["hits"]["hits"][0]["_source"]["images"]["downsized"]["url"]
response["hits"]["hits"][0]["_source"]["images"]["downsized"]["size"]
response["hits"]["hits"][0]["_explanation"]
response["hits"]["hits"][0]["_explanation"]["description"]
response["hits"]["hits"][0]["_explanation"]["value"]
response["hits"]["hits"][0]["_explanation"]["details"]
response["hits"]["hits"][0]["_explanation"]["details"][1]
response["hits"]["hits"][0]["_explanation"]["details"][1]["description"]
response["hits"]["hits"][0]["_explanation"]["details"][1]["details"]

find the value of these expressions!
   expression
response["timed_out"]
response["hits"]["max_score"]
response["hits"]["hits"][2]["_type"]
response["hits"]["hits"][0]["_score"]
response["hits"]["hits"][3]
response["hits"]["hits"][0]["_source"]["url"]
response["hits"]["hits"][2]["_source"]["_type"]
response["hits"]["hits"][1]["_source"]["images"]["original"]
response["hits"]["hits"][2]["_source"]["images"]["fixed_width_still"]["width"]
response["hits"]["hits"][0]["_source"]["images"]["fixed_width"]["webp_size"]
response["hits"]["hits"][0]["_explanation"]["details"][1]["description"]
response["hits"]["hits"][1]["_explanation"]["details"][1]["details"][1]["value"]
response["hits"]["hits"][1]["_explanation"]["details"][0]["details"][1]["details"][0]["description"]
response["hits"]["hits"][1]["_explanation"]["details"][1]["details"][1]["details"][1]["details"][0]

find expressions for object(s) containing...
   key value
"successful" 5
"_node" "0JKUPgGIRY-YvmP-gxORMw"
"_shard" 0
"_shard" 1
"_id" "AVmL0jUDkYB-m1uFMkeg"
"rating" "g"
"slug" "roxbury-noot-MYGiHGhVgkzcc"
"url" "http://media2.giphy.com/media/MYGiHGhVgkzcc/200w_d.gif"
"trending_datetime" "1970-01-01 00:00:00"
"trending_datetime" "0000-00-00 00:00:00"
"url" "http://media0.giphy.com/media/FCQvc3IreTNNm/giphy.gif"
"size" 7276040
"width" 178
"frames" "277"
"description" "sum of:"
"description" "function score, product of:"
"value" 1.4054651
"description" "weight(slug:roxbury in 0) [PerFieldSimilarity], result of:"
"description" "random score function (seed: -1948904415)"
"value" 0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment