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.
Questions tagged [sunspot]
855 questions
10
votes
1 answer
Solr/Lucene is it possible to order first by relevance, and then by a second attribute?
In Solr/Lucene is it possible to order first by relevance, and then by a second attribute?
As far as I can tell if I set an ordering parameter, it totally overrides relevance, and sorts by the ordering parameter(s).
How can I have results sorted…

William Jones
- 18,089
- 17
- 63
- 98
10
votes
1 answer
How do I set up a facet search with a many to many relationship using Sunspot?
I haven't implemented a search feature before and feel a bit stuck. I have a Sunspot search feature which finds results based on keywords - this works great - but I now want to implement the multi select facet feature, but I can't even seem to…

the-undefined
- 753
- 1
- 6
- 18
9
votes
1 answer
What's the difference between Sunspot keywords and fulltext
I am refactoring my code and found out that I use both keywords and fulltext to search. The use of fulltext is used at Readme and keywords is used in Wiki. There was a discussion mentioning that those are different ways of doing the same thing,…

lulalala
- 17,572
- 15
- 110
- 169
9
votes
1 answer
Rails Sunspot gem: Usings facets with multiple model site-wide searches
I'm trying to implement a sitewide search through the powerful Sunspot gem for Rails. This involves a search across multiple, very different models at once. What I WANT to do is use the faceting feature to allow the user to filter their search…

chrisk
- 235
- 3
- 6
9
votes
4 answers
connection rejected from solr in Rspec
I use the sunspot-rails for search. These is a Rspec looks like:
describe "GET search" do
before(:all) do
system("rake", "sunspot:solr:start")
end
after(:all) do
system("rake", "sunspot:solr:stop")
end
it "should do some search"…

Lai Yu-Hsuan
- 27,509
- 28
- 97
- 164
9
votes
1 answer
Sunspot highlights not appearing
I've gone through the docs in github: http://github.com/outoftime/sunspot to find solutions for highlighting, but it doesn't seem to work for me.
My Job model has something like this block (omitted some fields on purpose):
searchable do
text…

maricris-sn
- 158
- 9
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…

Bashar Abdullah
- 1,545
- 1
- 16
- 27
9
votes
3 answers
Sunspot Solr Gem & .gitignore
I am running the sunspot_solr & sunspot_rails gem in development and I get an insane number of changes to index files and data files every time I start and stop the development and/or sunspot server. It's driving me crazy doing version control.
gem…

Brooks
- 286
- 1
- 9
9
votes
1 answer
Sunspot Rails difference between :text an :string type fields
As everyone is aware in your searchable model you can define an index of type :text as well as :string, for example:
class Post < ActiveRecord::Base
searchable do
string :title
text :title, :body
end
I tried searching for the basic…

Sahil Dhankhar
- 3,596
- 2
- 31
- 44
8
votes
7 answers
Can't reindex with sunspot / solr in rails app - Error: Severe errors in solr configuration
Ok, so I have a simple rails application and now i'm trying to implement sunspot for search capabilities. However, after I've generated the config file with rails g sunspot_rails:install and after I've started the server and it has made the solr-dir…

cakism
- 255
- 3
- 10
8
votes
1 answer
Sunspot solr search, how to return all records at once?
I am using solr via sunspot in my rails application where I need to return more than 30 records which is set by default. I can do it as told in
Sunspot solr but i don't want pagination for the data. I want to display all the data in a single page…

Bijendra
- 9,467
- 8
- 39
- 66
8
votes
1 answer
Sunspot Index Only When Searchable Fields Change
We are using sunspot for search in our latest project. We also use devise and are indexing our user model as follows:
searchable do
text :fname
text :lname
text :email
text :description
text :twitter_username
end
With this setup, a user…

ghempton
- 7,777
- 7
- 48
- 53
8
votes
3 answers
Redis full text search : reverse indexing or sunspot?
I have 3,5 millions records (readonly) actually stored in a MySQL DB that I would want to pull out to Redis for performance reasons. Actually, I've managed to store things like this into Redis :
1…

gbarillot
- 309
- 1
- 2
- 13
8
votes
1 answer
RSolr::Error::InvalidRubyResponse - 200 OK
I am getting following error even after starting forreman and starting sunspot:solr :
RSolr::Error::InvalidRubyResponse - 200 OK
Error: java.lang.NullPointerException
at…

Dhara Joshi
- 407
- 5
- 9
7
votes
4 answers
Capture Ant output
Can anyone suggest to me the best way to capture the output from an Ant command?
I'm writing some routing tests for sun spot devices. The command itself returns network statistics. I'm trying to write something which will dump all these results into…

Steve
- 21,163
- 21
- 69
- 92