Sha256: ff9dc3c6aa62b353364fc96ad31425305e0436b651fcb4e76e9bea58923102f5

Contents?: true

Size: 303 Bytes

Versions: 21

Compression:

Stored size: 303 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

21 entries across 21 versions & 2 rubygems

Version Path
blacklight-8.6.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.6.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.5.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.5.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.4.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/lib/blacklight/solr/response/more_like_this.rb
blacklight-8.3.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.2.2 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.2.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.2.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.1.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.1 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta8 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta7 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta6 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta5 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta4 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta3 lib/blacklight/solr/response/more_like_this.rb
blacklight-8.0.0.beta2 lib/blacklight/solr/response/more_like_this.rb