<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Ruby Text Search</title>
	<atom:link href="http://davedupre.com/2007/08/02/ruby-text-search/feed/" rel="self" type="application/rss+xml" />
	<link>http://davedupre.com/2007/08/02/ruby-text-search/</link>
	<description>Some random thoughts - Go big or stay home!</description>
	<pubDate>Tue, 14 Oct 2008 00:07:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Leif</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-239</link>
		<dc:creator>Leif</dc:creator>
		<pubDate>Tue, 05 Aug 2008 09:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-239</guid>
		<description>Hi Dave,

i send you an email.
"Title" is an field in the table "offers".

See'ya
Leif</description>
		<content:encoded><![CDATA[<p>Hi Dave,</p>
<p>i send you an email.<br />
&#8220;Title&#8221; is an field in the table &#8220;offers&#8221;.</p>
<p>See&#8217;ya<br />
Leif</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-236</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 01 Aug 2008 13:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-236</guid>
		<description>Looks about the same as what I do.  The only difference I see is that use:

require 'search'

instead of

require_dependency 'search'

Is title an attribute of your Offer model?

Please dump what the log spits out when you hit the search action.  I'm curious to see what it's doing. Feel free to remove anything you don't want to be seen, or you can email it to me @ dave [at] davedupre.com.</description>
		<content:encoded><![CDATA[<p>Looks about the same as what I do.  The only difference I see is that use:</p>
<p>require &#8217;search&#8217;</p>
<p>instead of</p>
<p>require_dependency &#8217;search&#8217;</p>
<p>Is title an attribute of your Offer model?</p>
<p>Please dump what the log spits out when you hit the search action.  I&#8217;m curious to see what it&#8217;s doing. Feel free to remove anything you don&#8217;t want to be seen, or you can email it to me @ dave [at] davedupre.com.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leif</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-235</link>
		<dc:creator>Leif</dc:creator>
		<pubDate>Fri, 01 Aug 2008 06:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-235</guid>
		<description>OK.

Controller looks like:
--------------------------------------
def search
     if params[:query]
       @offers = Offer.search(params[:query])
     else
       @offers = []
     end
  end
--------------------------------------

Model:
--------------------------------------
require_dependency "search"

class Offer &#60; ActiveRecord::Base
  searches_on :all
end
--------------------------------------

Form:
--------------------------------------
 {:action =&#62; :search} do &#124;f&#124; %&#62;



--------------------------------------

View for results:
--------------------------------------

     There were no results for your query
 
  
 
     Result: 
 

 
--------------------------------------

Thanks for your help!
See'ya
Leif</description>
		<content:encoded><![CDATA[<p>OK.</p>
<p>Controller looks like:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
def search<br />
     if params[:query]<br />
       @offers = Offer.search(params[:query])<br />
     else<br />
       @offers = []<br />
     end<br />
  end<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Model:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
require_dependency &#8220;search&#8221;</p>
<p>class Offer &lt; ActiveRecord::Base<br />
  searches_on :all<br />
end<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Form:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
 {:action =&gt; :search} do |f| %&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>View for results:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>     There were no results for your query</p>
<p>     Result: </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Thanks for your help!<br />
See&#8217;ya<br />
Leif</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-234</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 01 Aug 2008 02:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-234</guid>
		<description>I need a little more info.  Based on your comment, it looks like there is a number being loaded into something that is expected to be a model.  Please update a little bit of your code, and I can take a look.</description>
		<content:encoded><![CDATA[<p>I need a little more info.  Based on your comment, it looks like there is a number being loaded into something that is expected to be a model.  Please update a little bit of your code, and I can take a look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leif</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-233</link>
		<dc:creator>Leif</dc:creator>
		<pubDate>Thu, 31 Jul 2008 20:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-233</guid>
		<description>Hi Dave!

I'm new to Rails and trying to build an small test app which uses your search script. At the moment i get the error
---
undefined method `title' for 0:Fixnum
---
I don't know what went wrong. Any hints?

Thanks in advance.
Leif</description>
		<content:encoded><![CDATA[<p>Hi Dave!</p>
<p>I&#8217;m new to Rails and trying to build an small test app which uses your search script. At the moment i get the error<br />
&#8212;<br />
undefined method `title&#8217; for 0:Fixnum<br />
&#8212;<br />
I don&#8217;t know what went wrong. Any hints?</p>
<p>Thanks in advance.<br />
Leif</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Svoboda</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-221</link>
		<dc:creator>Ryan Svoboda</dc:creator>
		<pubDate>Mon, 07 Jul 2008 20:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-221</guid>
		<description>Thanks for the code, working great so far :)</description>
		<content:encoded><![CDATA[<p>Thanks for the code, working great so far <img src='http://davedupre.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-182</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 15 May 2008 17:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-182</guid>
		<description>My pleasure. Glad I could help.</description>
		<content:encoded><![CDATA[<p>My pleasure. Glad I could help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-181</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Thu, 15 May 2008 17:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-181</guid>
		<description>Hi Dave, I found the code in the rails wiki and gave it a try... It was giving me a little error with the :includes, but I've tested your version and works perfect for me! 
I felt I should leave you a message: Thank you so much :)</description>
		<content:encoded><![CDATA[<p>Hi Dave, I found the code in the rails wiki and gave it a try&#8230; It was giving me a little error with the :includes, but I&#8217;ve tested your version and works perfect for me!<br />
I felt I should leave you a message: Thank you so much <img src='http://davedupre.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-87</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 06 Mar 2008 01:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-87</guid>
		<description>My pleasure. Thanks for the comment. I don't know why I bothered to comment section out since I never would have used that option anyway. I've always used MySQL or MS SQL Server, and both of those default to case insensitive searches.  Therefore, I pulled it out for my purposes.</description>
		<content:encoded><![CDATA[<p>My pleasure. Thanks for the comment. I don&#8217;t know why I bothered to comment section out since I never would have used that option anyway. I&#8217;ve always used MySQL or MS SQL Server, and both of those default to case insensitive searches.  Therefore, I pulled it out for my purposes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://davedupre.com/2007/08/02/ruby-text-search/#comment-86</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Wed, 05 Mar 2008 20:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2007/08/02/ruby-text-search/#comment-86</guid>
		<description>Dear Dave,

       Thank you vey much for the code. It worked well. 

       I just want to give a quick warning to about case sensitivity. If you are using Oracle you need to uncomment the following code: 

# DND: no need for this since mysql is already case insensitive.
      unless options[:case] == :sensitive
        text.downcase!
        fields.map! { &#124;f&#124; "LOWER(#{f})" }
      end

     Thanks again for your help.</description>
		<content:encoded><![CDATA[<p>Dear Dave,</p>
<p>       Thank you vey much for the code. It worked well. </p>
<p>       I just want to give a quick warning to about case sensitivity. If you are using Oracle you need to uncomment the following code: </p>
<p># DND: no need for this since mysql is already case insensitive.<br />
      unless options[:case] == :sensitive<br />
        text.downcase!<br />
        fields.map! { |f| &#8220;LOWER(#{f})&#8221; }<br />
      end</p>
<p>     Thanks again for your help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
