Move code into SchemaDataIndex