Sha256: 5a156bd0ebaad23e1730047a02a5b43699d1d878d8ba206c357e0ece39af3aac

Contents?: true

Size: 279 Bytes

Versions: 3

Compression:

Stored size: 279 Bytes

Contents

module Blacklight::SolrResponse::MoreLikeThis
  def more_like document
    mlt = more_like_this[document.id]
    return [] unless mlt and mlt['docs']

    mlt['docs']
  end

  def more_like_this
    return {} unless self[:moreLikeThis]
        
    self[:moreLikeThis]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-5.15.0 lib/blacklight/solr_response/more_like_this.rb
blacklight-5.14.0 lib/blacklight/solr_response/more_like_this.rb
blacklight-5.13.1 lib/blacklight/solr_response/more_like_this.rb