The supported solution is on a search handler implement the setupMetadataStructure method;
PHP:
public function setupMetadataStructure(MetadataStructure $structure)
{
$structure->addField('conversation', MetadataStructure::INT);
$structure->addField('recipients', MetadataStructure::INT);
}
This way search will correctly function on Elastic Search 6+ and Elastic Search 5 and older.