Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from Rails 3.2, sunspot_rails and sunspot_solr 1.3.3, to Rails 4.x and gems version 2.1.x #527

Closed
clod81 opened this issue Dec 30, 2013 · 6 comments
Labels
solrconfig support Support requests

Comments

@clod81
Copy link

clod81 commented Dec 30, 2013

Hi,
I'm trying to upgrade my Rails app to rails v 4.x and therefore using gems v > 2.x .
I tried to use gems version 1.3.3, but it looks like they are not compatible with new rails version...

I now start solr in development and test doing: sunspot-solr start , leaving default options.

Anyway, I have most of the things working, apart from a strange behavior.

I have a model defined pretty much like this:

class AAA < ActiveRecord::Base

searchable do
    text    :code
    text    :name
end

end

Let's say I have a database entry with those values:

code: 'ABC'
name 'testy searchy'

If I try to do:

AAA.search do
   fulltext('abc')
end

I get proper result

If I try to do:

AAA.search do
   fulltext('ab')
end

I get proper result

If I try to do:

AAA.search do
   fulltext('testy')
end

I get proper result.

But if I try:

AAA.search do
   fulltext('tes')
end

I don't get any results, whereas in version 1.3.3 everything used to work fine.

What am I missing?

@clod81
Copy link
Author

clod81 commented Jan 2, 2014

I tried on an total empty / brand new rails 4 project, with just 1 active record model, 2 string fields.
I have the exact same issue described above.

@clod81
Copy link
Author

clod81 commented Jan 2, 2014

I ended up patching 1-3-stable to work with ralis 4 (only)

https://github.com/clod81/sunspot/tree/1-3-rails4

unsure if changes are all 'perfect', but seems to be working nicely with my app

@coderdave
Copy link

What's the status on this being fixed? I have the same issue.

@clod81
Copy link
Author

clod81 commented Jul 18, 2014

if you're interested, my branch in my fork https://github.com/clod81/sunspot/tree/1-3-rails41 works ok on rails 4.1. it's not a proper fix, but I never had issues so far and works as previously

@coderdave
Copy link

That's cool that there's a fork that works, but when you're experimenting with a library for the first time that doesn't even work as expected with the most basic setup, it's very discouraging. :(

@sunspot sunspot deleted a comment from ma2kubo May 29, 2019
@sunspot sunspot deleted a comment from ma2kubo May 29, 2019
@sunspot sunspot deleted a comment from ma2kubo May 29, 2019
@sunspot sunspot deleted a comment from ma2kubo May 29, 2019
@mlh758
Copy link
Collaborator

mlh758 commented May 29, 2019

Closing this due to age and this doesn't appear to still be an issue.

@mlh758 mlh758 closed this as completed May 29, 2019
@mlh758 mlh758 added solrconfig support Support requests labels May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solrconfig support Support requests
Projects
None yet
Development

No branches or pull requests

3 participants