app/models/solr_core/site_search.rb
# NOTE: This does NOT include spellchecking and is ONLY sorted by score.
This does NOT include spellchecking and is ONLY sorted by score.
This does NOT include spellchecking and is ONLY sorted by score .
def taxa(q, page = 1, per_page = 30)
      response = connection.paginate(page, per_page, "select",
        params: { q: q, fq: "resource_type:TaxonConcept", fl: "score",
          sort: "richness_score desc" })
      ids = response["response"]["docs"].map { |d| d["resource_id"] }
      taxa = TaxonConcept.with_titles.where(id: ids)
      response["response"]["docs"].each do |doc|
        doc["instance"] = taxa.find { |t| t.id == doc["resource_id"] }
      end
      response["response"]
    end
def taxa ( q , page = 1 , per_page = 30 ) response = connection . paginate ( page , per_page , "select" , params : { q : q , fq : "resource_type:TaxonConcept" , fl : "score" , sort : "richness_score desc" } ) ids = response [ "response" ] [ "docs" ] . map { | d | d [ "resource_id" ] } taxa = TaxonConcept . with_titles . where ( id : ids ) response [ "response" ] [ "docs" ] . each do | doc | doc [ "instance" ] = taxa . find { | t | t . id == doc [ "resource_id" ] } end response [ "response" ] end
NOTE: This does NOT include spellchecking and is ONLY sorted by score.
NOTE : This does NOT include spellchecking and is ONLY sorted by score .
q
<not_specific>
page
<not_specific>
per_page
<not_specific>