Questions tagged [sunspot-solr]

Sunspot is a DSL that exposes the best of the solr search API to the Ruby runtime.

301 questions
24
votes
6 answers

How to set Apache solr admin password

I an not very familiar with solr. I have installed solr successfully. It is using jetty webserver. My solr version is 4.10.3. It admin page is not protected by password. Anyone can access it. I want to apply a paaword on solr admin. How I will do…
Hafiz Muhammad Shafiq
  • 8,168
  • 12
  • 63
  • 121
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
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
11
votes
1 answer

Solr with Rails - rake sunspot:reindex is not working

I am stuck into a strange issue where I am looking for your inputs. My problem is: After deploying my application on Production using Capistrano, when I am doing solr re-indexing, it is giving me below error: $ bundle exec rake sunspot:reindex…
Puneet Pandey
  • 541
  • 2
  • 6
  • 23
9
votes
3 answers

Rails 4: RSolr::Error::Http (RSolr::Error::Http - 404 Not Found

I am in the process of upgrading my app to Rails 4, and now got my rails server, as well as sunspot solr, after a lot of tinkering, to run, I can access Solr admin page. However when I try to access solr from my rails development app to do search or…
7
votes
1 answer

Solr exception raised in server often org.mortbay.jetty.EofException java.net.SocketException: Broken pipe

this exception is raised often when system is insert new record db and update the solr index, is there anyone got same problem ? how to avoid it ? Mar 29, 2012 6:26:59 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/update…
Roc Yu
  • 93
  • 2
  • 8
7
votes
2 answers

Querying multiple models with different attributes using Sunspot

I'm using Sunspot to index and search several models in a Rails project and I need to limit results based on the models' HABTM associations with a Department model. This is because users may not have permission to see records in all departments so…
Simon
  • 1,716
  • 1
  • 21
  • 37
6
votes
3 answers

How to keep rails command from Rails Console running after SSH Client (PuTTy) closes

I connect to our Ubuntu production server using PuTTy. I want to reindex a specific Model using Solr. I want to run the reindex command from the Rails Console, i.e. Modelname.reindex (as this seems to run quicker than the rake task.) We are,…
Stanley
  • 5,261
  • 9
  • 38
  • 55
6
votes
1 answer

Sunspot / Solr Full text search - how to exclude certain fields from full text search?

I have implemented solr search for my rails application. I have indexed the fields for search and it is working perfectly. Now i want to exclude one particular field named Title while searching.How can i skip this particular field while searching.…
Sreehari K M
  • 555
  • 2
  • 5
  • 24
6
votes
2 answers

View raw Solr tokens for a single field on a single document

I'm debugging my Solr schema and I'd like to see the results of tokenizing a specific field. For a simplified example, if I have:
tristanm
  • 3,337
  • 2
  • 27
  • 40
5
votes
0 answers

SolrException: maxNumThreadStates must be >= 1 but was: 0

SolrException: maxNumThreadStates must be >= 1 but was: 0 I get following response while trying to create core. Can anyone help on how to deal with maxNumThreadStates?
Anupam
  • 869
  • 7
  • 13
5
votes
4 answers

sunspot solr how to search multiple models correctly? All examples online fail

How would one correctly search multiple models in SunSpot Solr? Profile model has_one :match searchable do string :country string :state string :city end Match model belongs_to :profile searchable do string…
Rubytastic
  • 15,001
  • 18
  • 87
  • 175
5
votes
2 answers

rails solr search limit total search results / get fixed number of results

I'm trying to perform a search, order the results randomly, and only return a number of results, not all matches. Something like limit(2) I've tried using the Solr param 'rows' but that doesn't seem to do anything: @featured_articles =…
gt565k
  • 7,755
  • 3
  • 16
  • 9
5
votes
2 answers

Sunspot Solr Autocomplete not working Ruby on Rails 3.2.3

I need helping getting Autocomplete working on my Solr Search bar. Am, using this https://github.com/xponrails/sunspot_autocomplete Followed the steps & it doesn't work. I get stuck at my search bar -how do I add it to it, while keeping the…
5
votes
2 answers

Sunspot Solr Search like Rails active record 'LIKE' search

Hi I have been using the normal rails active record LIKE search in my app, I started using sunspot solr search. I would like it to act as close to the rails LIKE search as possible. wine.rb #sunspot stuff searchable :auto_index => true,…
Francois
  • 10,465
  • 4
  • 53
  • 64
1
2 3
20 21