Last modified: 2014-04-23 12:13:57 UTC
Code: for hit in result['hits']: db = hit['_index'].split('_', 1)[0] title = hit['_source']['title'] print('{:<20}{}'.format(db, title)) Outputs wg Common.js brwiki Common.js That wg should be wg_enwiki. Full index names: wg_enwiki_general_1395289813Common.js brwiki_general_firstCommon.js
Change 129105 had a related patch set uploaded by Ori.livneh: mwgrep: account for db names with underscores https://gerrit.wikimedia.org/r/129105
Change 129105 merged by Ori.livneh: mwgrep: account for db names with underscores https://gerrit.wikimedia.org/r/129105