Sha256: 658974ebd462ea31f299077785a64ca496b5c7f582f21feb6eff0f929cddc97c

Contents?: true

Size: 302 Bytes

Versions: 75

Compression:

Stored size: 302 Bytes

Contents

# frozen_string_literal: true
module Blacklight::Solr::Response::MoreLikeThis
  def more_like document
    mlt = more_like_this[document.id]
    return [] unless mlt && mlt['docs']

    mlt['docs']
  end

  def more_like_this
    return {} unless self[:moreLikeThis]

    self[:moreLikeThis]
  end
end

Version data entries

75 entries across 75 versions & 2 rubygems

Version Path
blacklight-7.18.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.17.2 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.17.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.17.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.16.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.15.2 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.15.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.15.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.14.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.14.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.13.2 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.13.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.13.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.12.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.12.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.11.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.10.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.9.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.8.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-7.8.0 lib/blacklight/solr/response/more_like_this.rb