Questions tagged [sunspot-solr]

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

301 questions
4
votes
2 answers

Sunspot -- Boost records where matches occur early in the text

For example, let's say there is a record in my DB that has the text "Hormel Corporation" and my search term is something like "Hormel Corned Beef 16 Ounces". As my current configuration stands, the top results will be other records, even though…
D-Nice
  • 4,772
  • 14
  • 52
  • 86
4
votes
3 answers

Sunspot-solr is eating up too much memory? What's a convenient way to reduce memory usage?

So it seems Sunspot-Solr is eating a lot of memory up. And its probably due to my malpractice as a programmer allocating proper usage of it. First of all, I do not allow sunspot to reindex by itself. searchable :auto_index => false do This alone I…
Trip
  • 26,756
  • 46
  • 158
  • 277
4
votes
0 answers

Getting undefined method `contains_attachment?' when using sunspot_solr for search inside the documents/attachment

I am trying to implement fulltext search inside attachments using sunspot_solr but getting undefined method contains_attachment? when running rake sunspot:solr:reindex. I am following…
Mayank
  • 171
  • 1
  • 6
4
votes
1 answer

sunspot solr complains bout unsupported major.minor version 51.0

2.5 and ruby 2.1.6, with the latest version of sunspot_solr and sunspot_rails, when I run rake sunspot:solr:run it gives this error: rake sunspot:solr:run Please require the stackprof gem falling back to fast_stack Starting Solr on port…
Nik So
  • 16,683
  • 21
  • 74
  • 108
4
votes
1 answer

What is the difference between Solr Replication and Solr Cloud?

I'm supporting on rails project, which contain rails app and additional instance with Solr. My environment: rails 3.2.1, ruby 2.1.2, sunspot 2.1.0, Solr 4.1.6. Problem: Clould provider is not stable. I cannot use other cloud provider - it is…
bmalets
  • 3,207
  • 7
  • 35
  • 64
4
votes
0 answers

How to Password Protect Sunspot Solr Server Admin Pages in an Rails App

How can i protect the solr admin pages using a password? I'm using : sunspot_rails (2.1.1) sunspot_solr (2.1.1) Application Setup : Rails 3.2.12 ruby 2.0.0p598
Alfie
  • 2,706
  • 1
  • 14
  • 28
4
votes
1 answer

Rails Sunspot Solr any_of with scalar field and fulltext search

I am using rails 4.0 with sunspot solr. I wish to do a this: (read_flag IS TRUE) OR ( (read_flag IS NIL) AND (fulltext params[:search] is true)) This is my code in (post.rb): @search = Post.search do any_of with…
jaxxie
  • 141
  • 8
4
votes
1 answer

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request error?

I'm trying to index rich documents but I'm facing some issues. I'm following this link: http://cbpowell.wordpress.com/2012/09/18/indexing-rich-documents-with-rails-sunspot-solr-sunspot-cell-and-carrierwave-cookbook-style/ $rake sunspot:reindex rake…
Kanna
  • 990
  • 1
  • 11
  • 30
4
votes
1 answer

Solr: Can't search for numbers mixed with characters

I have some items in my index (Solr. 4.4), which contain names like Foobar 135g, where the 135g refers to some weights. Searching for foobar or foobar 135 does work, but when I try to search for the exact phrase foobar 135g, nothing is found. I…
23tux
  • 14,104
  • 15
  • 88
  • 187
4
votes
1 answer

How do I check if an association exists in ActiveRecord from inside a model?

I tried all combinations that I could find online and it always fails. class Profile < ActiveRecord::Base belongs_to :user, :dependent => :destroy has_one :match # educational matches accepts_nested_attributes_for :match …
4
votes
2 answers

Sunspot Rails - Prevent Indexing on Save

By default, the sunspot solr gem issues an index command to the solr server as part of the save callback. This behavior is acceptable in most of my app, but there are some parts of it (especially those in rake tasks for bulk processing) where I want…
alpheus
  • 979
  • 6
  • 15
  • 34
4
votes
1 answer

Errno::ECONNREFUSED in UsersController#create

My application is up so then I proceeded to register. After I input my information I receive an error page saying: Errno::ECONNREFUSED in UsersController#create Connection refused - {:data=>"
4
votes
3 answers

Reindex Sunspot Solr in Capistrano

I'm following this snippet for adding Sunspot Solr in Capistrano https://gist.github.com/doitian/1795439 and it works, but when I run cap solr:reindex it shows a question (as expected) asking if I want to drop all indexes, so I answer with "yes" but…
pablomarti
  • 2,087
  • 2
  • 22
  • 35
4
votes
2 answers

While searching with sunspot_rails on Solr, how can I boost whole word matching over partial word matching?

I am using sunspot_rails to submit queries to a Solr instance. Everything works ok, but I want to order my results with the following criteria: I want to take first the documents where the matching term appears as word rather than as part of a…
p.matsinopoulos
  • 7,655
  • 6
  • 44
  • 92
4
votes
1 answer

Solr fulltext search in production - which is better sunspot:solr bundled solution or standalone tomcat+solr?

We are utilizing sunspot's Solr gem for a while in development mode. The application is now needs to be moved to production environment. Are there any cons of setting up solr in production environment using the bundled sunspot gem ? I generally like…
wojciechz
  • 1,086
  • 8
  • 16
1
2
3
20 21