Fix record indexer metadata fetching, was messed up with doctrine
Avoid error maxClauseCount in ES when the field is too large