[Work in progress] Restore build file index and abstract index query.