phabricator elastic search logic

Change-Id: Ieb05b5ee067b6612b63cd5b3777904b4cd842937