generic inverted indexer