← Back to Upcase

Solr doesn't return results

(Nikhil Chikorde) #1

I am at the last part where

def to_relation
Shout.search { fulltext term }.results

Should return results from solr however it returns [ empty ] array… I looked into solr -load term-info and the search term returned results but not to Rails


Started GET “/search?utf8=%E2%9C%93&search%5Bterm%5D=shout&commit=Search” for at 2019-02-26 20:44:32 -0500
(0.7ms) SELECT “schema_migrations”.“version” FROM “schema_migrations” ORDER BY “schema_migrations”.“version” ASC
Processing by SearchesController#show as HTML
Parameters: {“utf8”=>“✓”, “search”=>{“term”=>“shout”}, “commit”=>“Search”}
Rendering searches/show.html.erb within layouts/application
SOLR Request (54.8ms) [ path=select parameters={fq: [“type:Shout”], q: “shout”, fl: “* score”, qf: “content_text”, defType: “edismax”, start: 0, rows: 30} ]
Rendered collection of templates [0 times] (0.0ms)
Rendered searches/show.html.erb within layouts/application (97.3ms)
User Load (3.0ms) SELECT “users”.* FROM “users” WHERE “users”.“remember_token” = $1 ORDER BY “users”.“id” ASC LIMIT $2 [[“remember_token”, “9bdb5ea86af06600df2e02ba79e0921e087a0984”], [“LIMIT”, 1]]