added test and support for inverted indexes to user repository