add support for collection index (use fieldname $idx)