Questions tagged [sunspot-rails]

Sunspot Rails Plugin

Sunspot Rails is a Rails plugin that provides drop-in integration of the Sunspot[http://outoftime.github.com/sunspot] Solr search library with Rails

411 questions
4
votes
1 answer

Rails Sunspot - Is it possible to retrieve a facet row by the value?

If I have a query facet (and therefore know the row's value), is it possible to retrieve a specific row from the facet based on the known value? @search = Product.search do keywords(params[:q]) facet(:price) do row "[* TO 25]" do …
johnnycakes
  • 2,440
  • 2
  • 28
  • 36
4
votes
2 answers

Connecting a rails application with sunspot to a tomcat/solr server with authorization

Okay, so I have a separate server with solr and this connects perfectly fine with the app. Using the usual sunspot.yml we have something like: production: solr: hostname: domain port: 8080 log_level: WARNING path: path/to/data The…
4
votes
1 answer

Sunspot Solr facet with multiple filters

In sunspot solr we could group records with similar attributes via facets. But is it possible to do a facet filter from two attributes? I tried doing this on my search: facet_search = User.search do facet :attribute1,…
Lester Celestial
  • 1,454
  • 1
  • 16
  • 26
4
votes
2 answers

Rails - Sunspot conditional model indexing

Is there any way to determine on runtime if a model should be indexed or not? Something like: class Article < ActiveRecord::Base searchable :if => :indexable? do ... end private def indexable? ... end end
Vlad Zloteanu
  • 8,464
  • 3
  • 41
  • 58
4
votes
0 answers

Sunspot::Solr::Server::NotRunningError on rails app

I am using sunspot_rails and sunspot_solr gem 'sunspot_rails' gem 'sunspot_solr' When I try to run a feature test I am getting the following error server.rb:116:in `rescue in stop': Process with PID 38464 is no longer running…
Petran
  • 7,677
  • 22
  • 65
  • 104
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

Solr Sunspot - Reindexing objects is not automatically running

i'm using Sunspot Solr for indexing and searching in our Ruby on Rails application with MangoDB database (Mongo mapper) The searching works well, but objects aren't automatically indexed to Solr when i make changes on my database. I tried manually…
Zane Anis
  • 77
  • 1
  • 9
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
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
3 answers

Sunspot::Solr::Server::JavaMissing: You need a Java Runtime Environment to run the Solr server

Trying to start Solr with sunspot but having an issue with the Java Runtime Environment by getting this error. root@oktobTest:~# dokku run oktob bundle exec rake sunspot:solr:start rake aborted! Sunspot::Solr::Server::JavaMissing: You need a Java…
Ahmad Ajmi
  • 7,007
  • 3
  • 32
  • 52
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
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
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
1 2
3
27 28