app/indexers/object_indexer.rb
# Find all the collections the object belongs to, whether
# it has normal hydra-style collection membership or it
# uses the "local_collection_id" work-around to associate
# the object with a collection.
# Returns two arrays, a list of ids and a list of titles.
Find all the collections the object belongs to, whether
it has normal hydra-style collection membership or it
uses the "local_collection_id" work-around to associate
the object with a collection.
Returns two arrays, a list of ids and a list of titles.
Find all the collections the object belongs to whether it has normal hydra - style collection membership or it uses the " local_collection_id " work - around to associate the object with a collection . Returns two arrays a list of ids and a list of titles .
def collections
      results = (query_for_local_collections + query_for_hydra_collections).uniq
      results.map do |coll|
        [coll["id"], coll["title_tesim"]]
      end.transpose.map(&:flatten)
    end
def collections results = ( query_for_local_collections + query_for_hydra_collections ) . uniq results . map do | coll | [ coll [ "id" ] , coll [ "title_tesim" ] ] end . transpose . map ( & :flatten ) end
Find all the collections the object belongs to, whether
it has normal hydra-style collection membership or it
uses the "local_collection_id" work-around to associate
the object with a collection.
Find all the collections the object belongs to whether it has normal hydra - style collection membership or it uses the " local_collection_id " work - around to associate the object with a collection .