Skip to content

Instantly share code, notes, and snippets.

@antoinebqain
Created September 1, 2013 18:00
Show Gist options
  • Save antoinebqain/6406142 to your computer and use it in GitHub Desktop.
Save antoinebqain/6406142 to your computer and use it in GitHub Desktop.
models/ad.rb :
# To change this template, choose Tools | Templates
# and open the template in the editor.
class Ad
def initialize
end
def self.getMostRated
solr = RSolr.connect :url => 'http://127.0.0.1:20030/solr_waseet'
Rails.logger.info 'Solr', solr.inspect
@docs = solr.get 'select', :param => {
:q => '*:*',
:sort => 'ps_most_rated',
:fl => 'entity_id, score',
:rows => 10
}
end
end
Error :
Extracted source (around line #13):
Rails.logger.info 'Solr', solr.inspect ( highlighted in browser )
@docs = solr.get 'select', :param => {
:q => '*:*',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment