Set index/type in dataprovider. Add trace.

@phpnode Merging this myself. Feel free to comment, though.