Skip to content

Instantly share code, notes, and snippets.

@dmpeters
Last active December 15, 2015 14:59
Show Gist options
  • Save dmpeters/5278367 to your computer and use it in GitHub Desktop.
Save dmpeters/5278367 to your computer and use it in GitHub Desktop.
elastic search log and confusion
pyelasticsearch: DEBUG: Making a request equivalent to this: curl -XPOST 'http://localhost:9200/_bulk?op_type=create' -d '{"index": {"_type": "player", "_index": "nba"}}
{"college": "Lanier HS/USA", "name": "Monta Ellis", "weight": 185, "years_pro": 7, "dob": "10/26/1985", "position": "G", "team": "Bucks", "number": 11, "height": "6-3"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "FC Barcelona/Turkey", "name": "Ersan Ilyasova", "weight": 235, "years_pro": 4, "dob": "05/15/1987", "position": "F", "team": "Bucks", "number": 7, "height": "6-10"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Colorado/USA", "name": "Chauncey Billups", "weight": 210, "years_pro": 15, "dob": "09/25/1976", "position": "G", "team": "Clippers", "number": 1, "height": "6-3"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Kentucky/USA", "name": "Eric Bledsoe", "weight": 195, "years_pro": 2, "dob": "12/09/1989", "position": "G", "team": "Clippers", "number": 12, "height": "6-1"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Michigan/USA", "name": "Jamal Crawford", "weight": 200, "years_pro": 12, "dob": "03/20/1980", "position": "G", "team": "Clippers", "number": 11, "height": "6-5"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Detroit Mercy/USA", "name": "Willie Green", "weight": 201, "years_pro": 9, "dob": "07/28/1981", "position": "G", "team": "Clippers", "number": 34, "height": "6-3"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Wake Forest/USA", "name": "Chris Paul", "weight": 175, "years_pro": 7, "dob": "05/06/1985", "position": "G", "team": "Clippers", "number": 3, "height": "6-1"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Villanova/USA", "name": "Maalik Wayns", "weight": 195, "years_pro": 1, "dob": "05/02/1991", "position": "G", "team": "Clippers", "number": 2, "height": "6-1"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Seton Hall/Haiti", "name": "Samuel Dalembert", "weight": 250, "years_pro": 1, "dob": "05/10/1981", "position": "C", "team": "Bucks", "number": 21, "height": "6-11"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Auburn/USA", "name": "Marquis Daniels", "weight": 200, "years_pro": 9, "dob": "01/07/1981", "position": "F", "team": "Bucks", "number": 6, "height": "6-6"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Duke/USA", "name": "Mike Dunleavy", "weight": 230, "years_pro": 1, "dob": "09/15/1980", "position": "F", "team": "Bucks", "number": 17, "height": "6-9"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Kansas/USA", "name": "Drew Gooden", "weight": 250, "years_pro": 1, "dob": "09/24/1981", "position": "C-F", "team": "Bucks", "number": 0, "height": "6-10"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "UCLA/Cameroon", "name": "Luc Mbah a Moute", "weight": 230, "years_pro": 4, "dob": "09/09/1986", "position": "F", "team": "Bucks", "number": 12, "height": "6-8"}'
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): localhost
requests.packages.urllib3.connectionpool: DEBUG: "POST /_bulk?op_type=create HTTP/1.1" 200 219
pyelasticsearch: DEBUG: response status: 200
pyelasticsearch: DEBUG: Making a request equivalent to this: curl -XGET 'http://localhost:9200/nba/player/y_9YLtLjT7e9kQzBr04u_g' -d '""'
requests.packages.urllib3.connectionpool: DEBUG: "GET /nba/player/y_9YLtLjT7e9kQzBr04u_g HTTP/1.1" 200 273
pyelasticsearch: DEBUG: response status: 200
pyelasticsearch: DEBUG: got response {u'_type': u'player', u'exists': True, u'_source': {u'name': u'Monta Ellis', u'weight': 185, u'years_pro': 7, u'dob': u'10/26/1985', u'number': 11, u'height': u'6-3', u'college': u'Lanier HS/USA', u'team': u'Bucks', u'position': u'G'}, u'_index': u'nba', u'_version': 1, u'_id': u'y_9YLtLjT7e9kQzBr04u_g'}
pyelasticsearch: DEBUG: Making a request equivalent to this: curl -XGET 'http://localhost:9200/nba/player/y_9YLtLjT7e9kQzBr04u_g/_mlt?mlt_fields=position' -d '""'
requests.packages.urllib3.connectionpool: DEBUG: "GET /nba/player/y_9YLtLjT7e9kQzBr04u_g/_mlt?mlt_fields=position HTTP/1.1" 200 122
pyelasticsearch: DEBUG: response status: 200
pyelasticsearch: DEBUG: got response {u'hits': {u'hits': [], u'total': 0, u'max_score': None}, u'_shards': {u'successful': 5, u'failed': 0, u'total': 5}, u'took': 5, u'timed_out': False}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment