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
3
votes
0 answers

Solr sunspot search on models having fields with same name not working

I have two models Posts and Comment both have title,description fields for which i have set text,ngram fieldtypes and fields with text type give me results but fields with ngram type does not give me any results my models are like class Post <…
ashishmohite
  • 1,120
  • 6
  • 14
3
votes
0 answers

My solr suggestions doesn't display results

I updated my solr to 4.9.1 (I want to implement solr Suggester) and updated its solrconfig.xml mySuggester
Ardian
  • 155
  • 2
  • 11
3
votes
1 answer

How to setup Solr Cloud with two search servers?

Hi I'm developing rails project with sunspot solr and configuring Solr Cloud. My environment: rails 3.2.1, ruby 2.1.2, sunspot 2.1.0, Solr 4.1.6. Why SolrCloud: I need more stable system - oftentimes search server goes on maintenance and web…
bmalets
  • 3,207
  • 7
  • 35
  • 64
3
votes
2 answers

rails sunspot not returning correct results

I have a model Foo with an attribute named listed. Now I am running a simple sunspot(solr) query foos = Foo.search do with :listed, true end.results It is returning all foos that have listed = true except two of them. I have already tried…
3
votes
0 answers

Sunspot Solr highlight: Always highlight from the beginning

I need Highlights to be from the beginning of the sentence. For example: Indexed Field: I am drinking beer in Downtown Pub. If the search query is drinking beer, the returned result is: I am drinking beer in Downtown Pub. What I want…
Niroj Shrestha
  • 165
  • 1
  • 1
  • 6
3
votes
2 answers

Solr (sunspot) not finding partial word match when suffix included

I'm implementing solr into a Rails app, specifically pertaining to ingredient searches. If I do a partial word match on a simple noun like "beef" or "chicken", I can type in any number of letters from 1 to the full string, and it finds ingredients…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
3
votes
1 answer

Error using progress bar: Max must be a positive integer

Whenever I reindex a with solr, I get the following error $ RAILS_ENV=development rake sunspot:solr:reindex Error using progress bar: Max must be a positive integer How do I fix this?
Teej
  • 12,764
  • 9
  • 72
  • 93
3
votes
2 answers

Sunspot solr NO JSP connection error

In my app I had sunspot solr up and running just fine until a few days ago. Now all of a sudden I can't even start my solr in development. Everytime I run rake sunspot:solr:run it throws this error: :INFO:oejw.StandardDescriptorProcessor:NO JSP…
iamdhunt
  • 443
  • 6
  • 16
3
votes
1 answer

Sunspot solr: boost scalar fields

I am scoping by multiple scalar fields and I am hoping to push the scoped results to the top of the search results without excluding results that do not meet the criteria for favorite authors. Articles have and belong to many authors This doesn't…
Brooks
  • 286
  • 1
  • 9
3
votes
1 answer

Solr not reindexing correctly - Sunspot Solr with Solr 4

I have a similar issue that Solr with Rails - rake sunspot:reindex is not working. I have these in my Gemfile: gem 'sunspot_solr', github: 'sunspot/sunspot', branch: 'master' gem 'sunspot_rails', github: 'sunspot/sunspot', branch:…
sites
  • 21,417
  • 17
  • 87
  • 146
3
votes
2 answers

Sunspot Solr partial search working in development but not in production after deploying

I am using sunspot solr for free text searching. I am trying to search trader from trader model. Here is the searchable block searchable do text :name text :postcode text :phone text :phone_alt text :phone_mobile end Here is the…
3
votes
2 answers

Don't split on underscore with solr.StandardTokenizerFactory

I'm using solr, I'm using StandardTokenizerFactory in the text field but I don't want to split on the underscore. Do I have to use another toknizer like PatternTokenizerFactory or I can do this with StandardTokenizerFactory ? as I need the same…
Moustafa Samir
  • 2,248
  • 1
  • 25
  • 32
3
votes
1 answer

Solr+Sunspot: Having different boost on tags of a record -- possible?

I have a model, say Post. It has tags. Each of the tags has a weight that should be reflected in search. Can I somehow store these tags and boost each of them with its weight? Example: Post title is "Eating outside" Tags are "burgers" (weight 5),…
elado
  • 8,510
  • 9
  • 51
  • 60
3
votes
1 answer

How can I set Sunspot to search for sequences of characters instead of words?

I wanted to understand whether Sunspot, in standard mode, searches for words or sequences of characters in full-text search and how to make it search for sequences. For example, I have the following setup: class User < ActiveRecord::Base …
p.matsinopoulos
  • 7,655
  • 6
  • 44
  • 92
3
votes
1 answer

How to do simple boolean query in sunspot solr

>>> marketing = User.search do |s| >>> s.fulltext "Marketing" >>> end >>> marketing.total 1448 >>> sales = User.search do |s| >>> s.fulltext "Sales" >>> end >>> sales.total 567 >>> marketing_and_sales = User.search do |s| >>> …
Krishna Prasad Varma
  • 4,670
  • 5
  • 29
  • 41