Improved performance of getting indexed file paths

Using a select on indexview to get the filepaths. This query is faster
and results in a lot less unneeded data getting transfered.