Questions tagged [rsolr]

RSolr gem, which is a simple, extensible Ruby client for Apache Solr.

A simple, extensible Ruby client for Apache Solr. This gem provides better options than the "deprecated" ruby-solr gem.

Notice: This document is only for the the 1.0 in the master. The last pre 1.0 gem release documentation can be found here: github.com/mwmitchell/rsolr/tree/v0.12.1

The code docs for the last release can be viewed here : rdoc.info/projects/mwmitchell/rsolr

25 questions
6
votes
2 answers

Query solr cluster for state of nodes

I'm trying to tweak our system status check to see the state of the Solr nodes in our SolrCloud. I'm facing the following problems: We send a query to each of the Solr nodes separately. If we get a response and the status of the response is 0, we…
Denis
  • 360
  • 1
  • 4
  • 15
5
votes
2 answers

sunspot heroku websolr authorization

We are using sunspot-rails to connect to websolr on Heroku. Websolr provides an authorization feature to protect read and update calls. This authorization feature requires three additional http headers to be present in every call to SOLR. I am…
anishdeena
  • 71
  • 4
3
votes
1 answer

solr newly added documents on indexes not reflected before restart

I am facing the strange behavior with solr insertion. Newly added documents never reflected in index. i have to restart the solr app instance in glassfish server to get the updates. This is happening all the time. Initially i was using lucene and it…
RameshVel
  • 64,778
  • 30
  • 169
  • 213
2
votes
1 answer

SSL Support for sunspot (solr) requests

In Rails project we are using sunspot gem for Solr full text search engine. Sunspot is built on top of the RSolr library, which provides a low-level interface for Solr interaction. Is there any possibility to set that RSolr requests to SOLR server…
aboltart
  • 171
  • 3
  • 11
2
votes
2 answers

Group documents with rSolr

I am building an application in ruby on rails which makes use of Solr 4. To support Solr 4 in my application I am using the rSolr gem. I am trying to parse a query and let the resulting documents be grouped on a number. The querying doesn't form a…
Denis
  • 360
  • 1
  • 4
  • 15
1
vote
1 answer

When should I create Solr connection in a Rails app

I'm accessing Solr in a Ruby on Rails application by using rsolr (not Sunspot). I create the local solr object that I use to send requests like this: solr = RSolr.connect(:url => "http://localhost:8983/solr") as far as I understand, this is not…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
1
vote
1 answer

How to upload a file with rsolr?

I have a file which needs to be indexed on our solr server. How can I upload a file? I know how to do it with curl: curl "http://localhost:8983/solr/update/extract?literal.id=doc1&uprefix=attr_&fmap.content=attr_content&commit=true" -F…
ndee
  • 225
  • 3
  • 13
1
vote
0 answers

which is better gem for solr cloud setup in rails 4.1 application for aws hosting,I had researched some gems as below

which is better gem for solr cloud setup in rails 4.1 application for aws hosting,I have done research on the below gems . gem 'rsolr-cloud', gem 'rsolr', gem 'sunspot_solr' which is the best setup for solr cloud setup in aws hosting using…
1
vote
1 answer

Sunspot Solr Reindexing failing due to illegal characters

I'm having an issue where Solr is failing to reindex my site, due to the following error from my production log: bundle exec rake sunspot:solr:reindex rake aborted! RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request Error: Illegal character…
Goldnuggets
  • 223
  • 1
  • 3
  • 13
0
votes
0 answers

Where's my time going mysteriously?

I have a ruby script that uses rsolr rubygem to generate XMLs and POST them to Apache Solr (javadoc Update Command) surfaced by Jetty Server. My script logs certain time using the following code 405 unless docs.empty? 406 begin 407 …
pr4n
  • 2,918
  • 3
  • 30
  • 42
0
votes
0 answers

Ruby 2.3.1 how to set the project root directory in config.rb

I have a project in Ruby 2.3.1 and I'm using at the moment absolute path to a folder where I'm having uploaded files. What I would like to use instead is a relative path. I would like to know how to set in Ruby config.rb the root directory / so I…
Jakub
  • 2,367
  • 6
  • 31
  • 82
0
votes
1 answer

rsolr not returning facet fields

I'm working on a solr project which indexes text documents of students. I'm using rsolr to get all documents of a cohort. Additionally I want to know which facets are available for the cohort field. The problem is that the rsolr-generated response…
Alexander
  • 195
  • 1
  • 13
0
votes
1 answer

Why Solr match data and count mismatch while using group.limit?

I am executing a SOLR Query where I group titles and limit the number of title in groups. The problem I face is I don't get an exact number of matches with the passed…
Santosh Mohanty
  • 468
  • 1
  • 6
  • 23
0
votes
0 answers

"Error: data should be 2 dimensional "while trying solr_facet

when i am using a solr_facet search on my data , i get a reactive data but when i try to render it onto a table and view the fetched data i get the error : data must be 2 dimensional . Could anyone help with this ? I can see the facet values and the…
0
votes
0 answers

Using Ruby variable in Rsolr requests

Is it possible to send a request to Solr using a Ruby variable? require 'rubygems' require 'rsolr' solr = RSolr.connect :url => 'http://solrserver.com' response = rsolr.get 'select', :params => {:q => "prefName:#{params[:query]}"} This code will…
s0rin
  • 127
  • 1
  • 9
1
2