searchlogic

How Do I get searchlogic to work with rails 3?

爷,独闯天下 提交于 2019-12-02 18:33:01
I put searchlogic in my gemfile... and now my rails server won't start :( this is the errormessage gems/ruby-1.8.7-p299/gems/activesupport-3.0.0/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `merge_joins' for class `Class' (NameError) from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain' from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/searchlogic-2.4.27/lib/searchlogic/active_record/consistency.rb:8:in `included' from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299

searchlogic and virtual attributes

匆匆过客 提交于 2019-12-01 13:46:30
Let's say I have the following model: Person <AR def name [self.first_name,self.middle_name,self.last_name].select{|n| n.present?}.join(' ') end end How could I do a search on the virtual attribute with searchlogic, something like: Person.search.name_like 'foo' Of courese I could construct a large statement like: Person.search.first_name_like_or_last_name_like_or_... 'argh' but surely there is a more elegant way. Searchlogic can be combined with existing named scopes and must be in case of virtual attributes. One such would be: named_scope :name_like, lambda { |name| { :conditions => ['first

How to sanitize form params for use with Searchlogic? [Rails]

三世轮回 提交于 2019-12-01 09:21:19
问题 Example form <% form_for @search do |f| %> <ul> <li> <%= f.label :item_number_equals, "Item number" %><br /> <%= f.text_field :item_number_equals %> </li> <li> <%= f.label :description_keywords, "Description" %><br /> <%= f.text_field :description_keywords %> </li> <li> <%= f.check_box :in_stock %> <%= f.label :in_stock, "In Stock?" %> </li> <li> <%= f.label :price_gte, "Price Min" %> <%= f.text_field :price_gte, :size => 3 %> <%= f.label :price_lte, "Max" %> <%= f.text_field :price_lte,

Will searchlogic work with Rails 3?

拈花ヽ惹草 提交于 2019-11-30 05:30:02
问题 If not what are my alternatives? 回答1: Metawhere - http://metautonomo.us/projects/metawhere/ looks like a promising alternative. ps: discovered metawhere through rubyflow.com. MetaSearch (http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/) by the same author is actually closer to Searchlogic. 回答2: Please use Railsdog's rd_searchlogic (3.0.0.rc4), it's modified to be fully compatible with Rails3. You can extract this plugin from Spree 0.30 project. 回答3: scoped

Full Text Searching with Rails

只谈情不闲聊 提交于 2019-11-27 18:00:53
I've been looking into searching plugins/gems for Rails. Most of the articles compare Ferret (Lucene) to Ultrasphinx or possibly Thinking Sphinx, but none that talk about SearchLogic . Does anyone have any clues as to how that one compares? What do you use, and how does it perform? Gene T thinking_sphinx and sphinx work beautifully, no indexing, query, install problems ever (5 or 6 install, including production slicehost ) why doesn't everybody use sphinx, like, say craigslist? read here about its limitations (year and a half old articles. The sphinx developer, Aksyonoff, is working on these

Combine two named scopes with OR (instead of AND)

痴心易碎 提交于 2019-11-27 14:11:56
I want to find all Annotations whose bodies are either: Equal to "?" or Like "[?]" What's the best way to do this? I would like to use SearchLogic if possible, but though SearchLogic allows you to do each of the following: Annotation.body_equals('?') Annotation.body_like('[?]') and you can always chain them together: Annotation.body_equals('?').body_like('[?]') I'm not sure how to combine them with OR . Note that you can combine named scopes with OR if their argument is the same. E.g., I could do: Annotation.body_equals_or_body_like('?') But this wouldn't help. Note that I'm not attached to

Full Text Searching with Rails

荒凉一梦 提交于 2019-11-27 04:16:05
问题 I've been looking into searching plugins/gems for Rails. Most of the articles compare Ferret (Lucene) to Ultrasphinx or possibly Thinking Sphinx, but none that talk about SearchLogic. Does anyone have any clues as to how that one compares? What do you use, and how does it perform? 回答1: thinking_sphinx and sphinx work beautifully, no indexing, query, install problems ever (5 or 6 install, including production slicehost ) why doesn't everybody use sphinx, like, say craigslist? read here about

Combine two named scopes with OR (instead of AND)

混江龙づ霸主 提交于 2019-11-26 16:37:41
问题 I want to find all Annotations whose bodies are either: Equal to "?" or Like "[?]" What's the best way to do this? I would like to use SearchLogic if possible, but though SearchLogic allows you to do each of the following: Annotation.body_equals('?') Annotation.body_like('[?]') and you can always chain them together: Annotation.body_equals('?').body_like('[?]') I'm not sure how to combine them with OR . Note that you can combine named scopes with OR if their argument is the same. E.g., I