common api for indexes and transformers