When sorting on a field which might be an id for an entity type, the id field must be consistent for all the entity types searched, which might not be the case. To mitigate this situation, a solution would be to also index the id field with its original name, not only store it in the Elasticsearch _id field. |