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

Configurable default query terms operator (AND or OR) #36

Open phurni opened 12 years ago

phurni commented 12 years ago

Refactor of SearchIndex and added new feature to let the user chose the default operator between query terms to AND (legacy) or OR (new).

Explicit AND can also be expressed when the default operator is OR (best of both worlds).

Upgrading to this new version will not break existing code (tests are green).

dougal commented 11 years ago

Hi Pascal.

Some cool stuff in here, I especially like the Query class.

I won't be adding it to the next release, but I will be looking at this more thoroughly for an upcoming release.

Thanks for your contribution.

D.

phurni commented 11 years ago

You're welcome.

Take a look at the relevant factor, because I really think this is a bug (relevant factor being reversed)

Best Regards,

dougal commented 11 years ago

This commit? de0a0b2

phurni commented 11 years ago

I put that in its own branch, this commit: https://github.com/phurni/acts_as_indexed/commit/369f751876b3db666aaccf54c43b53b347652ef8

Note thought that I didn't pushed the patch upstream here, I'll do that in the following days.

dougal commented 11 years ago

Ooh, that is a doozy of a bug! Definitely worthy of a new release ASAP.

I'll get on that tomorrow.

Thanks again.