We're getting dangerously close to 1.0 here. (Update:: not that dangerously close. Grab 0.9.7.
12 if you run into compatability issues with MetaWhere.) Squashed a silly bug or two, and added support for two features often requested by Searchlogic switchers, searching against multiple columns with or, and polymorphic belongs_to association searches. I've also switched to using left outer joins for searches now. This has its pros and cons. SQL geekery past the break.
Con: your potential result set includes rows that haven't got a match in the right-hand side of any joins being made. This means more rows to search, which can mean a slower-running query.
Pro: your potential result set includes rows that haven't got a match in the right-hand side of any joins being made. This means you won't inadvertently exclude rows in the event that you do:
Article.search :body_or_comments_body_contains => "awesome"
With an inner join (the typical join used by ActiveRecord for associations) this means that any Articles which don't have any comments will be left out of the search, so you're not going to end up seeing Articles with "awesome" in their bodies unless those articles also have comments. A left outer join will always include the left-hand rows, even when they don't have a match on the right-hand. This means your awesome articles will shine through, even if they don't have any comments.
This also opens up the ability to easily generate searches for articles that have no comments:
Article.search :comments_id_is_null => true
Hope you enjoy the new release. If you run into any problems, let me know!comments powered by Disqus