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
0
votes
3 answers
Get SOLR index size
I am using Sunspot (Ruby/Rails) on top of SOLR in my webapp. Now I run into problems when SOLR hits Java heap space. I cannot figure out how to find the SOLR index size? Is there a way to find this out from command-line?

TTT
- 6,505
- 10
- 56
- 82
0
votes
0 answers
Sunspot Solr (or any other fulltext search engine) and filters to search with
i know how to use fulltext search in rails 3.2 (i use sunspot solr) but i want to know if you can filter specific things. so you can shorten the list of search results.
i don't know how to do this so that's why i ask this question :)
Thanks.

Kees Sonnema
- 5,759
- 6
- 51
- 106
0
votes
1 answer
No field configured for Model with name 'image_filename'
I have a Model with 2 atrributes:
:image_filename
:yt_video_id
I have this code in my controller:
def index
@search = Model.solr_search do |s|
s.fulltext params[:search]
s.paginate :page => params[:page], :per_page => 2
…

hyperrjas
- 10,666
- 25
- 99
- 198
0
votes
1 answer
Rails 3 Searching Multiple Models by created_at using sunspot
I'm trying to get a "What's new" section working in my Rails app that takes into account new records created for various tables that don't share any relationships. The one thing they do have in common is that they all have a created_at field, which…

Noz
- 6,216
- 3
- 47
- 82
0
votes
2 answers
Sunspot scoped queries not working
I'm implementing a fulltext search using Sunspot with scoped queries, but it's not working. When I remove the 'with' queries and search, it works, but when I add the queries in it does not. I've looked at the documentation and it should be…

ahuang7
- 804
- 1
- 11
- 26
0
votes
2 answers
Solr minimum match results ranking
In my Rails application I have a Question model, setup with sunspot solr, with a field "text" and I'd like to search in that field doing a logical OR between words. I've found that setting minimum_match to 1 solves my problem, however I'd like also…

Matteo Depalo
- 13
- 5
0
votes
1 answer
How to index a virtual field that changes with respect to time
I have a virtual field weight that changes based on the difference in time between now and object created_at time. I want to update it in Sunspot every 2 hours, so I was planning to call Topic.solr_index.
However I think Sunspot will only index…

lulalala
- 17,572
- 15
- 110
- 169
0
votes
2 answers
Failure starting sunspot solr server
I have a problem with starting the sunspot server. last week it worked like a charm but now i get an error when i run rake sunspot:solr:run
my output using --trace
C:\contractbeheersysteem2>rake sunspot:solr:run --trace
** Invoke sunspot:solr:run…

Kees Sonnema
- 5,759
- 6
- 51
- 106
0
votes
1 answer
Display search results from Sunspot in Rails
I've managed (through this forumn) to search across multiple models with sunspot. Now I'm stuck on how to display the results in the way intended.
Here is what is in my controller
@search = Sunspot.search [Gear, User] do
fulltext…

DaveG
- 1,203
- 1
- 25
- 45
0
votes
2 answers
how to configure edismax handler in sunspot?
can any one explain how to start with using edismax request handler in sunspot?
I want to use wild card search in my application. currently dismax handler is there.i searched and found that edismax is only option for wild card search.*please give me…

Raj gupta
- 51
- 5
0
votes
1 answer
Boost_fields per class in Sunspot
So in Sunspot, it is possible to do this:
QUERY_DOCUMENT_BOOST_OPTIONS = {
:user => 2,
:product => 1,
}
fulltext query do
[User, Product].each do |m|
boost(QUERY_DOCUMENT_BOOST_OPTIONS[m.name.underscore.to_sym]) { with(:class, m) }
…

Jure Triglav
- 1,862
- 18
- 22
0
votes
1 answer
sunspot with i18n framework in rails 3.2
I'm using sunpost gem for search in my rails project.
I have now two languages in my app:
I18n.default_locale = :en
LANGUAGES = [
['English',
'en'],
["Español".html_safe, 'es']
]
I have in my post.rb model, a language attribute that contains…

hyperrjas
- 10,666
- 25
- 99
- 198
0
votes
2 answers
No Errors but no speed increase using sunspot gems
I ran speed tests comparing the results between the traditional Post.all(...) and Sunspot's Post.search(...) against a table with about 3000 records. In both cases, it takes 12 seconds to load. Everything seems to work, execept any improvement in…

iamtoc
- 1,569
- 4
- 17
- 24
-1
votes
1 answer
Filter association in search results using rails sunspot
I have this model
class Subject
has_many: contents
has_many: titles, :through => :contents
searchable do
text :titles, :default_boost => 5, :stored => true do
my_titles = titles.map { |title| title.try(:name) }
if…

wiwit
- 73
- 1
- 7
- 26
-1
votes
2 answers
Do you recommend TTL, SPI or I2C with SunSPOT
I am starting to try to interface with some external components (Skyetek M1 Mini or M1 RFID scanner) than supports the following protocols TTL, SPI or I2C. I am wondering which one of these routes you would recommend. The app that is running on the…

smaclell
- 4,568
- 7
- 41
- 49