Questions tagged [sunspot-rails]

Sunspot Rails Plugin

Sunspot Rails is a Rails plugin that provides drop-in integration of the Sunspot[http://outoftime.github.com/sunspot] Solr search library with Rails

411 questions
0
votes
1 answer

Keywords search with multiple terms

I would like to write something like this: keywords ['apple', 'peach'], :fields => [:fruits] If I have two different instances where one has 'apple' and the other has 'peach', I want both of them to be returned in results. I have tried syntax,…
rastko
  • 567
  • 9
  • 24
0
votes
1 answer

Sunspot - Search multiple models using a conditional with call

class Cat < ActiveRecord::Base searchable do string :color end end class Dog < ActiveRecord::Base searchable do string :color end end Given the models Cat and Dog above, how do I do a sunspot search for All dogs + only cats that are…
Andrew Hubbs
  • 9,338
  • 9
  • 48
  • 71
0
votes
1 answer

Sunsopt Solr Not Searching Zips That Start With 0

I am Using SunSpot Solr for Searching text and zip codes through my application. I am searching through the model like below, searchable do text :city integer :zip end def self.search_with_solr(search_word) search =…
0
votes
1 answer

rails sunspot solr not working with has_and_belongs_to_many

rails sunspot solr not working with has_and_belongs_to_many events -- has_and_belongs_to_many --tags searchable do text :title, :boost => 5 text :description text :tag_names do tags.map(&:name) end end In the above example…
0
votes
1 answer

rails sunspot solr search by keywords

I am working around search for 2 days to query keyword search using sunspot solr. I am unable to understand My expected output is if i search for laptops in US it should search for laptop and us But the below code search only laptops and not the…
Prabhakaran
  • 3,900
  • 15
  • 46
  • 113
0
votes
1 answer

How do I boost the score of speicifc classes

I have 3 classes, Products, Reviews, Categories. When someone searches, I would like the categories to show up first, then Reviews, then Categories. My first thought is to boost the score of each class. The sunspot documentation describes how to do…
gitb
  • 1,090
  • 2
  • 12
  • 20
0
votes
1 answer

Sunspot search results not correct

post.rb ... searchable do text :title, :description string :category time :created_at integer :post_id end ... post_controller.rb @search = Post.search do fulltext params[:q] with(:created_at).less_than…
0
votes
1 answer

Unusual sunspot_rails behaviour with some keywords not matching

I have found a very strange bug using Sunspot Rails, with some keywords being ignored/not matching. If you go here: http://www.ycn.org/showcase/portfolios and search for "Owen" you will return two…
Daniel
  • 245
  • 3
  • 10
0
votes
0 answers

reindex with sunspot Error - Connection reset by peer - retrying... rake aborted! Connection refused -

When I run the reindex command rake rake sunspot:solr:reindex it dosn't work. The solr server stop with a fatal error and reindex showing this Error - Connection reset by peer - retrying... rake aborted! Connection refused - Please help me.
Md Sirajus Salayhin
  • 4,974
  • 5
  • 37
  • 46
0
votes
1 answer

sunspot:reindex error - getaddrinfo: nodename nor servname provided, or not known

I'm working with a Rails 3.2 application that has a mysql database and a number of models that are being indexed in Solr. Here's what's happening: I am running the following command: RAILS_ENV=development bundle exec rake sunspot:reindex[1000]…
Tom Chapin
  • 3,276
  • 1
  • 29
  • 18
0
votes
1 answer

Can Sunspot/Solr work with different RequestHandlers for different Rails classes?

I have one Rails app with two very different classes that are being indexed in Solr (using Sunspot). One is users and the other is a product catalog. There are specific RequestHandlers that I'd like to use for just the product catalog. Do I set up…
NatGordon
  • 956
  • 2
  • 10
  • 17
0
votes
1 answer

Sunspor Solr in production

I saw this question Setup sunspot solr with rails in production environment. But I see my output: bundle exec sunspot-solr start ...sunspot_solr is not part of the bundle. Add it to Gemfile. I have sunspot_solr under development group, and I…
sites
  • 21,417
  • 17
  • 87
  • 146
0
votes
1 answer

Rails Sunspot Solr data source

Thank you in advance for bearing with me. I am new to Solr and looking to integrate into Rails. Although Postgres can text search, Solr seems to be faster.. I understand the modifications that need to happen to the models and controllers within the…
0
votes
1 answer

How to return search results with Sunspot and Solr in rails app?

I am having some trouble with Sunspot and Solr. When I pass a parameter, I'm getting no results. I've included in the comments at 2 points in the code. I've confirmed that there is also data in the Review table in my db and that the string does…
sharataka
  • 5,014
  • 20
  • 65
  • 125