bugfix use prepareEntityIndex in own engine and use correct helper method
bugfix index referenced by entity_id, correctly build name_attributes fix #1, fix #3. Thx korhov!