Questions tagged [sunspot]

Sunspot is a Ruby gem that interfaces with the Apache Solr search server. All the power of the Solr search engine; all the beauty of Ruby. Sunspot exposes all of Solr's most powerful search features using an API of elegant DSLs. That means robust, flexible fulltext search with no boolean queries and no string programming.

855 questions
33
votes
7 answers

Rails app: Solr throwing RSolr::Error::Http - 404 Not Found when executing search

Very lost as I haven't made any changes to my search which has always been working but somehow I've got a break. Being relatively new to Rails, the error output isn't giving me enough detail to debug. Relevant code below - ask if you want to see…
justinraczak
  • 776
  • 2
  • 9
  • 24
28
votes
2 answers

Setup sunspot solr with rails in production environment

I have tried various links but I can't seem to find a good resource on creating a running solr instance that works with rails in production. I understand that you have to setup the solr server for production. I have tried the setup of solr with…
Lester Celestial
  • 1,454
  • 1
  • 16
  • 26
18
votes
2 answers

Reindexing a particular model in Sunspot seems to make no difference in time taken

My application usually takes 20 minutes to reindex as a whole. There is a small table with a couple of records which I want to reindex again. I want to save time so I ran the command rake sunspot:solr:reindex[500,Deal]. This is taken straight from…
lulalala
  • 17,572
  • 15
  • 110
  • 169
17
votes
3 answers

sunspot_rails not re-indexing model after save

I have a model which deploys a delayed job that updates some of its attributes. The model is declared "searchable"... searchable do text :content, :stored => true end ... which I thought would re-index after a save. On testing, this doesn't…
Newy
  • 38,977
  • 9
  • 43
  • 59
16
votes
3 answers

Sunspot rails: include associated models when calling .results

Let's say that I want to search for Events in my app. When I display the results, I want to display who created the event, for instance. Is there any way to add .includes(:user) somewhere, to avoid unnecessary queries (one for each event)? I can't…
Robin
  • 21,667
  • 10
  • 62
  • 85
15
votes
2 answers

How does Sunspot modify Solr's schema.xml? Does it modify it at all?

Let me know if I am wrong, but I think solr only expects fields that are already mentioned in the schema.xml. So, if I have a field called 'title', I need to mention this in the schema. There is no mentioning about modifying the schema.xml in the…
denniss
  • 17,229
  • 26
  • 92
  • 141
14
votes
7 answers

SocketError (getaddrinfo: Name or service not known) - Sunspot/Solr Rails development

I have had lots of trouble with deploying my rails 3.0.10 application to Ubuntu 10.04 server with Passenger, Capistrano, nginx and MySQL (and even more trouble with apache2). After downgrading rake to 0.8.7 it's finally working, but now Sunspot/Solr…
Johan Hovda
  • 855
  • 2
  • 10
  • 23
14
votes
1 answer

Sunspot with multiple models (in Rails)

I have three models (User, Tag, Product) and they interact s.t. User has many Tags and Products. For searching purposes, I would like to be able to search (with one search bar) on user names, tag names, and product descriptions. I would also like to…
user592419
  • 5,103
  • 9
  • 42
  • 67
14
votes
9 answers

Can't reindex Sunspot SOLR - Error - RSolr::Error::Http - 500 Internal Server Error

Everytime i try to reindex using... rake sunspot:solr:reindex These error messages always show: Error - RSolr::Error::Http - 500 Internal Server Error - retrying... Error - RSolr::Error::Http - 500 Internal Server Error - ignoring... Error -…
xirukitepe
  • 1,575
  • 7
  • 26
  • 54
13
votes
5 answers

Sunspot_Rails - undefined method `searchable' on page

I have a model with a searchable block, like so: class Contact < ActiveRecord::Base searchable do text :contact_name, :company_name, :contact_email end end In the controller's index action, I'm calling Contact.new, which is giving me an…
PaulC
  • 491
  • 6
  • 18
13
votes
3 answers

How to configure Solr to do partial word matching

Given the following set of values how do I configure the field to return values that are partial word matches but that also match the entire search term? Values: Texas State University Stanford University St. Johns College Desired results…
Andrew Hubbs
  • 9,338
  • 9
  • 48
  • 71
11
votes
1 answer

sunspot - solr - How to do Exact match

articles = Article.search do |s| s.fulltext "Java Script" end How do i tell sunspot like give me all the results which exactly matches "Java Script" Right now am getting results like "Java, Unix Scripting" (I think its the edge n gram which i…
Krishna Prasad Varma
  • 4,670
  • 5
  • 29
  • 41
11
votes
2 answers

How to reindex only some objects in Sunspot Solr

We use Sunspot Solr for indexing and searching in our Ruby on Rails application. We wanted to reindex some objects and someone accidentally ran the Product.reindex command from the Rails Console. The result was that indexing of all products started…
Stanley
  • 5,261
  • 9
  • 38
  • 55
10
votes
4 answers

undefined method "results" with Sunspot Solr Search

I am using Rails 3.1 and have been using this railscast tutorial to implement sunspot. I am following everything right (i think) however when I run the search like this: class ProductsController < ApplicationController # GET /products # GET…
alik
  • 3,820
  • 9
  • 41
  • 55
10
votes
1 answer

Sunspot indexing and searching tags returns everything

I am using act_as_taggable_on for tagging in our projects, along with sunspot/solr for searching. We get a strange unexpected result. First our setup (short version): Model: Class Person has_many :projects searchable do string…
ErwinM
  • 5,051
  • 2
  • 23
  • 35
1
2 3
56 57