Fixed issues with indixing references. Closes #1129.

16 jobs for !901 with 1129-search-does-not-work-for-some-metadata-fields in 42 minutes and 58 seconds (queued for 1 second)
latest merge request