dougal / acts_as_indexed

Acts As Indexed is a plugin which provides a pain-free way to add fulltext search to your Ruby on Rails app
http://douglasfshearer.com/blog/rails-plugin-acts_as_indexed
MIT License
211 stars 49 forks source link

Adds score variable to matched / sorted results and multi model support #48

Open brez opened 11 years ago

brez commented 11 years ago

Makes the matching score available for use inside the instance.

brez commented 11 years ago

Just added this multi model support as well - tests written / all passing with rake test

brez commented 11 years ago

Looks like the CI is busted - here's my local result

Finished tests in 4.481758s, 12.9414 tests/s, 52.8810 assertions/s.

58 tests, 237 assertions, 0 failures, 0 errors, 0 skips
dougal commented 11 years ago

CI has been intermittently failing for some Ruby/Rails versions for a while. Not sure why, they always run fine locally.

The score instance variable patch is almost insta-merge, though I'm not sure about the name as it seems it might clash with other libraries or even user defined attributes. I'd prefer not to add yet more configuration for this, perhaps calling it search_score or something less generic.

I'll need to look at the Multi-Model patch more closely, but it looks great on first pass.

Thanks!

brez commented 11 years ago

Please see:

[master 0647300] changes score variable name to the less generic search_score

Also:

Finished tests in 4.481221s, 12.9429 tests/s, 52.8874 assertions/s.

58 tests, 237 assertions, 0 failures, 0 errors, 0 skips
brez commented 8 years ago

Should I just close this?