changed document ids and separation of spectra and metadata documents in database