Class: Krikri::SearchIndexDocument

Inherits:
SolrDocument
  • Object
show all
Defined in:
app/models/krikri/search_index_document.rb

Overview

Subclass of Blacklight's SolrDocument. Represents a single document returned from a query to the search index.

Instance Method Summary collapse

Instance Method Details

#aggregationDPLA::MAP::Aggregation?

Get the aggregation, populated with data from Marmotta, which corresponds to this SearchIndexDocument

Returns:

  • (DPLA::MAP::Aggregation, nil)

11
12
13
14
15
16
# File 'app/models/krikri/search_index_document.rb', line 11

def aggregation
  agg = DPLA::MAP::Aggregation.new(id)
  return nil unless agg.exists?
  agg.get
  agg
end