Fix mrefs by implementing IN query in ElasticSearch