Skip to content

Commit

Permalink
Index the file size as a long. Fixes #1117
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 5, 2017
1 parent a870db6 commit 465aa5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/indexers/curation_concerns/file_set_indexer.rb
@@ -1,7 +1,7 @@
module CurationConcerns
class FileSetIndexer < ActiveFedora::IndexingService
include IndexesThumbnails
STORED_INTEGER = Solrizer::Descriptor.new(:integer, :stored)
STORED_LONG = Solrizer::Descriptor.new(:long, :stored)

def generate_solr_document
super.tap do |solr_doc|
Expand All @@ -12,7 +12,7 @@ def generate_solr_document
solr_doc[Solrizer.solr_name('label', :stored_sortable)] = object.label
solr_doc[Solrizer.solr_name('file_format')] = file_format
solr_doc[Solrizer.solr_name('file_format', :facetable)] = file_format
solr_doc[Solrizer.solr_name(:file_size, STORED_INTEGER)] = object.file_size[0]
solr_doc[Solrizer.solr_name(:file_size, STORED_LONG)] = object.file_size[0]
solr_doc['all_text_timv'] = object.extracted_text.content if object.extracted_text.present?
solr_doc['height_is'] = Integer(object.height.first) if object.height.present?
solr_doc['width_is'] = Integer(object.width.first) if object.width.present?
Expand Down
Expand Up @@ -50,7 +50,7 @@ def bytes
# Field name to look up when locating the size of each file in Solr.
# Override for your own installation if using something different
def file_size_field
Solrizer.solr_name(:file_size, CurationConcerns::FileSetIndexer::STORED_INTEGER)
Solrizer.solr_name(:file_size, CurationConcerns::FileSetIndexer::STORED_LONG)
end

# Solr field name collections and works use to index member ids
Expand Down

0 comments on commit 465aa5a

Please sign in to comment.