Module: Blacklight::Solr::Response::MoreLikeThis

Included in:
Blacklight::Solr::Response
Defined in:
lib/blacklight/solr/response/more_like_this.rb

Instance Method Summary collapse

Instance Method Details

#more_like(document) ⇒ Object



4
5
6
7
8
9
# File 'lib/blacklight/solr/response/more_like_this.rb', line 4

def more_like document
  mlt = more_like_this[document.id]
  return [] unless mlt && mlt['docs']

  mlt['docs']
end

#more_like_thisObject



11
12
13
14
15
# File 'lib/blacklight/solr/response/more_like_this.rb', line 11

def more_like_this
  return {} unless self[:moreLikeThis]

  self[:moreLikeThis]
end