Closed phebal closed 8 years ago
This is works for 2GB files and not slightly larger ones becuase 2147483648 (bytes) is right at the 31-bit limit for a signed integer type (2147483647) used by Solr for this field. As defined in:
sufia-models-6.6.0/app/services/sufia/generic_file_indexing_service.rb
Solrizer.solr_name('file_size', STORED_INTEGER)
that resolves to files_size_is
and is in turn defined in Solr schema.xml
as:
<dynamicField name="*_is" type="int" stored="true" indexed="false" multiValued="false"/>
Same filed is also defined for Collection objects and thus this will need to be fixed, because collections can contain multiple datasets that add up to an integer longer then 31 bit.
To fix this we need to redefine the field as long
(deprecated in later Solr) or trie long
. Something like this:
Solrizer.solr_name('file_size', Solrizer::Descriptor.new(:long, :stored))
that generates file_size_lts
. We then have to re-index all GenericFile and Collection objects in our repository.
Rails log:
Solr log: