<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>opensoul.org - Using shared indexes with acts_as_ferret Comments</title>
  <id>tag:opensoul.org,2009:/2008/4/29/using-shared-indexes-with-acts_as_ferret/comments</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
  <updated>2009-10-22T10:58:02Z</updated>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>tina</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:18320</id>
    <published>2009-10-22T10:58:02Z</published>
    <updated>2009-10-22T10:58:02Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by tina</title>
<content type="html">&lt;p&gt;Which kind of ferret search does find_with_ferret use? And how can I change the type of search?&lt;/p&gt;


	&lt;p&gt;Thank your!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Carlo</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:18182</id>
    <published>2009-10-16T08:43:22Z</published>
    <updated>2009-10-16T08:43:22Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Carlo</title>
<content type="html">&lt;p&gt;This post is really useful!! Is it possible to highlight the query in the results?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>madhu</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:17605</id>
    <published>2009-09-18T22:10:00Z</published>
    <updated>2009-09-18T22:10:00Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by madhu</title>
<content type="html">&lt;p&gt;very nice post!!. Thank you for the all the useful info.&lt;/p&gt;


	&lt;p&gt;what if two models have the same field name ? for example i have two models &#8220;student&#8221; and &#8220;teacher&#8221; both have a field name called &#8220;name&#8221;.  How to i set &#8220;default_fields&#8221; for both these models ? Will this syntax takes care of both ?
ferret   =&amp;gt; { :default_fields =&amp;gt; [:name]}&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>drake</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:17563</id>
    <published>2009-09-17T07:54:44Z</published>
    <updated>2009-09-17T07:54:44Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by drake</title>
<content type="html">&lt;p&gt;I&#8217;m using Ferret as gem on windows. And I&#8217;m using acts_as_ferret gem. I put require &#8216;acts_as_ferret&#8217; in the emvironment.rb. And put acts_as_ferret on model. But when I run Model.find_with_ferret(query) on console I have no result, just a blank array. Do you know how to solved it?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Marius &#381;il&#279;nas</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:14075</id>
    <published>2009-05-22T14:58:20Z</published>
    <updated>2009-05-22T14:58:20Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Marius &#381;il&#279;nas</title>
<content type="html">&lt;p&gt;Hi,
change
&amp;lt;%= render :partial =&amp;gt; &#8220;search/#{dom_class(result)}&#8221; %&amp;gt;  
to
&amp;lt;%= render :partial =&amp;gt; &#8220;search/#{dom_class(result)}&#8221;, :object =&amp;gt; result %&amp;gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Marius &#381;il&#279;nas</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:14074</id>
    <published>2009-05-22T14:58:07Z</published>
    <updated>2009-05-22T14:58:07Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Marius &#381;il&#279;nas</title>
<content type="html">&lt;p&gt;Hi,
change
&amp;lt;%= render :partial =&amp;gt; &#8220;search/#{dom_class(result)}&#8221; %&amp;gt;  
to
&amp;lt;%= render :partial =&amp;gt; &#8220;search/#{dom_class(result)}&#8221;, :object =&amp;gt; @result %&amp;gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>John Anderson</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:13896</id>
    <published>2009-05-18T13:48:54Z</published>
    <updated>2009-05-18T13:48:54Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by John Anderson</title>
<content type="html">&lt;p&gt;Regarding the problem above and Damon&#8217;s replies to the problem that seem unrelated to the issue:&lt;/p&gt;


	&lt;p&gt;undefined method `load_config&#8217; for ActsAsFerret:Module (NoMethodError)&lt;/p&gt;


	&lt;p&gt;It&#8217;s caused by forgetting to uninstall the gem while running with the local copy of the gem. Delete the gem and everything will work&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Max</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:8714</id>
    <published>2008-10-13T19:22:05Z</published>
    <updated>2008-10-13T19:22:05Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Max</title>
<content type="html">&lt;p&gt;Hi,&lt;/p&gt;


	&lt;p&gt;I&#8217;ve setup everything as explained in the article but I continue to get this error:
undefined method `find&#8217; for ActsAsFerret:Module&lt;/p&gt;


	&lt;p&gt;I&#8217;ve tried to Google the problem but I got  no answers found&#8230;
Anybody solved it?
Max&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>pjam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:8650</id>
    <published>2008-10-11T01:19:47Z</published>
    <updated>2008-10-11T01:19:47Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by pjam</title>
<content type="html">&lt;p&gt;just so that we have at least &lt;span class=&quot;caps&quot;&gt;ONE&lt;/span&gt; source with a working shared index, i&#8217;d like to give back.  Pagination.  To paginate a shared index in acts_as_ferret, add the following code to your controller, (rather then what is in the tutorial):&lt;pre&gt;per_page = 2
    @results = ActsAsFerret.find(params[:q], 'index_name', :page =&amp;gt; params[:page], :per_page =&amp;gt; per_page)&lt;/pre&gt;
Hope this helps someone.
Oh, and make sure you use the latest will_paginate from github, in rails 2.1&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Pau</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:8424</id>
    <published>2008-09-29T11:06:53Z</published>
    <updated>2008-09-29T11:06:53Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Pau</title>
<content type="html">&lt;p&gt;Nice tutorial but I have a couple of questions&#8230;&lt;/p&gt;


	&lt;p&gt;How can I use highlighting with shared index?&lt;/p&gt;


	&lt;p&gt;Its possible to use boosts in the fields?&lt;/p&gt;


	&lt;p&gt;Thank&#8217;s in advance!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Terri</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:7918</id>
    <published>2008-09-05T07:11:31Z</published>
    <updated>2008-09-05T07:11:31Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Terri</title>
<content type="html">&lt;p&gt;Hi Brandon,&lt;/p&gt;


	&lt;p&gt;I&#8217;m running Rails 2.1.&lt;/p&gt;


	&lt;p&gt;I was able to get this to work by adding the :locals parameter to the render partial statement so it reads:&lt;/p&gt;


	&lt;p&gt;&amp;lt;%= render :partial =&amp;gt; &#8220;shared/search_results_#{dom_class(result)}&#8221;, :locals =&amp;gt; {:&#8221;#{dom_class(result)}&#8221; =&amp;gt; result }  %&amp;gt;&lt;/p&gt;


	&lt;p&gt;Thanks again for the tutorial.&lt;/p&gt;


	&lt;p&gt;Terri&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:7812</id>
    <published>2008-09-04T00:55:42Z</published>
    <updated>2008-09-04T00:55:42Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Brandon</title>
<content type="html">&lt;p&gt;Terri,&lt;/p&gt;


	&lt;p&gt;That&#8217;s odd. Are you doing something different from the render code above?&lt;/p&gt;


	&lt;p&gt;You might want to try updating your version of Rails.  I don&#8217;t remember exactly which version fixed it, but Rails used to only look at the first model in an array to figure out which partial to use.  Update to the next version (2.0 if you&#8217;re on 1.2 or 2.1 if you&#8217;re on 2.0) and it &lt;strong&gt;should&lt;/strong&gt; work.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Terri</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:7507</id>
    <published>2008-08-29T09:13:34Z</published>
    <updated>2008-08-29T09:13:34Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Terri</title>
<content type="html">&lt;p&gt;hello,&lt;/p&gt;


	&lt;p&gt;Thanks for the tutorial.  It works fine, except when I try to render the partial.&lt;/p&gt;


	&lt;p&gt;I have two models, Reviews and Comments.&lt;/p&gt;


	&lt;p&gt;If my search term finds only Reviews, it successfully renders the results in the review_results partial.&lt;/p&gt;


	&lt;p&gt;If my search term finds only Comments, it correctly renders the results in the comment_results partial.&lt;/p&gt;


	&lt;p&gt;But if my search term finds both Reviews and Comments, it tries to render Reviews in the comment_results partial and Comments in the review_results partial, which fails because the two tables have different fields.&lt;/p&gt;


	&lt;p&gt;Have you encountered this?  Are you able to get two models to display in their respective partial views correctly?  Any ideas as to why it&#8217;s not working for me?&lt;/p&gt;


	&lt;p&gt;Thanks,&lt;/p&gt;


	&lt;p&gt;Terri&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6761</id>
    <published>2008-07-11T12:10:43Z</published>
    <updated>2008-07-11T12:10:43Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Brandon</title>
<content type="html">&lt;p&gt;mikeg,&lt;/p&gt;


	&lt;p&gt;I&#8217;m not sure that it&#8217;s possible using the shared index, but you can simply define another index that has just those two models.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>mikeg</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6722</id>
    <published>2008-07-06T21:07:30Z</published>
    <updated>2008-07-06T21:07:30Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by mikeg</title>
<content type="html">&lt;p&gt;how do I search only Person, Company with the shared index?
with:
 ActsAsFerret::find(&#8220;test&#8221;,[Person,Company])
it seems still returns all the result from 
  Person ,   Company , Post&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Sebastian</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6099</id>
    <published>2008-05-14T18:39:26Z</published>
    <updated>2008-05-14T18:39:26Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Sebastian</title>
<content type="html">&lt;p&gt;Usefull post!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6093</id>
    <published>2008-05-13T14:08:46Z</published>
    <updated>2008-05-13T14:08:46Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">&lt;p&gt;Brandon, thanks for the post and letting us work through it in your comments. P jam, could you post your code over at &lt;a href=&quot;http://www.railsforum.com/viewtopic.php?id=18060&quot;&gt;Rails Forum&lt;/a&gt; ?&lt;/p&gt;


	&lt;p&gt;Apologize for the delay&#8230;was away over the weekend.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6088</id>
    <published>2008-05-13T01:40:48Z</published>
    <updated>2008-05-13T01:40:48Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;day two friend.&lt;/p&gt;


	&lt;p&gt;your demo works fantastic.&lt;/p&gt;


	&lt;p&gt;i tried all of the same code, but added my models instead.  One of which is a Post with title and body&#8230;.&lt;/p&gt;


	&lt;p&gt;anyways, the only difference in the two apps is you use Postgres and i use mysql.&lt;/p&gt;


	&lt;p&gt;Also, i&#8217;ve got my search input form inside of my layouts file.  could that have something to do with it????  I&#8217;ve got no other answers.  i&#8217;m tapped out, starting to cry.  this is the last piece i need before i conquer the world with my new app!!!!!&lt;/p&gt;


	&lt;p&gt;i doubt that could be it, could it?  the ferret forum is being of no help&#8230; would hoped by now that someone would have picked it up, i.e., answer my plea!!!!!!!!!!!!!!!!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6087</id>
    <published>2008-05-13T01:39:38Z</published>
    <updated>2008-05-13T01:39:38Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;day two friend.&lt;/p&gt;


	&lt;p&gt;your demo works fantastic.&lt;/p&gt;


	&lt;p&gt;i tried all of the same code, but added my models instead.  One of which is a Post with title and body&#8230;.&lt;/p&gt;


	&lt;p&gt;anyways, the only difference in the two apps is you use Postgres and i use mysql.&lt;/p&gt;


	&lt;p&gt;i doubt that could be it, could it?  the ferret forum is being of no help&#8230; would hoped by now that someone would have picked it up, i.e., answer my plea!!!!!!!!!!!!!!!!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6072</id>
    <published>2008-05-12T03:13:31Z</published>
    <updated>2008-05-12T03:13:31Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;Appreciate the demo.  will look tomorrow.  it worked for me.&lt;/p&gt;


	&lt;p&gt;I&#8217;m wondering, if in the mean time, would myself using MySQL have any impact on why it hasn&#8217;t worked for me thus far?&lt;/p&gt;


	&lt;p&gt;the demo works like a champ, and i&#8217;m hoping it will help me fix my issues :-)&lt;/p&gt;


	&lt;p&gt;thanks and i&#8217;ll report back to my favourite forum&#8230;err&#8230; blog. cheers.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6070</id>
    <published>2008-05-12T02:36:55Z</published>
    <updated>2008-05-12T02:36:55Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Brandon</title>
<content type="html">&lt;p&gt;I’ve put together an &lt;a href=&quot;/assets/2008/5/12/ferret-example_1.zip&quot;&gt;example rails app&lt;/a&gt; that uses the shared index. It uses sqlite and has some date pre-populated. Start up script/server and do a search for “John”.&lt;/p&gt;


	&lt;p&gt;I&#8217;ve also removed parts of the post that may have led to confusion.  Hope that helps.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Funeral</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6068</id>
    <published>2008-05-11T21:45:17Z</published>
    <updated>2008-05-11T21:45:17Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Funeral</title>
<content type="html">&lt;p&gt;Very nice code, I am not quite clear about passing these parameters, but it make some sense for me.&lt;/p&gt;


	&lt;p&gt;Thanks,
Eddie Funeral&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6038</id>
    <published>2008-05-09T14:39:18Z</published>
    <updated>2008-05-09T14:39:18Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;Hi Brandon,&lt;/p&gt;


	&lt;p&gt;Is it possible to display your views, and search fields please?&lt;/p&gt;


	&lt;p&gt;When i pass params[:q], all i get is the name in which i typed.&lt;/p&gt;


	&lt;p&gt;Somehow, params[:q] doesn&#8217;t work it&#8217;s way through the &#8216;shared&#8217; index?  it must be how i&#8217;m passing the search term.&lt;/p&gt;


	&lt;p&gt;Perhaps you could do another post just devoted to the little bits, like the views and search forms, that were skipped in this post.  Much appreciated, and keep up the good work.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6026</id>
    <published>2008-05-08T20:13:13Z</published>
    <updated>2008-05-08T20:13:13Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;i don&#8217;t know where my last comment post went&#8230; but, i was saying, if we can talk about this on railsforum, it may be a better spot for us.&lt;/p&gt;


	&lt;p&gt;You&#8217;re the only dude i know with a similar issue, hope you don&#8217;t mind.&lt;/p&gt;


&lt;pre&gt;http://www.railsforum.com/viewtopic.php?id=18060&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6021</id>
    <published>2008-05-08T17:42:47Z</published>
    <updated>2008-05-08T17:42:47Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">The view is where things get ugly for me.
&lt;pre&gt;&amp;lt;%= render :partial =&amp;gt; @results %&amp;gt;&lt;/pre&gt;
Doesn&#8217;t look for other partials based on the model name (e.g., activities/_activity partial if the model is Activity), so I threw something together that&#8217;s very ugly in a _result partial:
&lt;pre&gt;&amp;lt;%= link_to_if(result.instance_of?(Activity), result.name, activity_path(result)){ link_to result.name, organization_path(result) } %&amp;gt;. . . .&lt;/pre&gt;
I am sure there is a better way to do this but I don&#8217;t know how. However, once I know what object I&#8217;m dealing with, I access it normally.</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6017</id>
    <published>2008-05-08T14:46:31Z</published>
    <updated>2008-05-08T14:46:31Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;the blog post that became a forum&#8230;. i bet if we help each other, this posting will go down as the posting that changed searching with ferret forever.
First, thanks damon.  for some reason it&#8217;s working now.  i got rid of all reference to aaf in my app and started with a new trunk plugin.  so far so good.  at least my server starts now.&lt;/p&gt;


	&lt;p&gt;So what do you use in your view then?&lt;/p&gt;


	&lt;p&gt;i keep getting blank views.&lt;/p&gt;


here is my searches/index.html.erb
&lt;pre&gt;&amp;lt;h1&amp;gt;Search Results&amp;lt;/h1&amp;gt;
&amp;lt;%= params.inspect %&amp;gt;
&amp;lt;% @results.each do |result| %&amp;gt;
  &amp;lt;%= render :partial =&amp;gt; &quot;searches/#{dom_class(result)}&quot; %&amp;gt;
&amp;lt;% end %&amp;gt;&lt;/pre&gt;
and let&#8217;s say i have a _user.html.erb partial for the user&#8217;s name i want to search.  here is the corresponding partial &lt;pre&gt;&amp;lt;%= link_to result.login, root_url %&amp;gt;&lt;/pre&gt;What am i doing wrong?  What does yours look like?  &lt;span class=&quot;caps&quot;&gt;THIS&lt;/span&gt; is the part that is screwing with my head.
p.s., i just wanted something to show up when i searched, hence the lame partial.  i&#8217;ll pimp it up when i get it working.</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6012</id>
    <published>2008-05-08T03:11:10Z</published>
    <updated>2008-05-08T03:11:10Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">&lt;p&gt;Sorry, half asleep here&#8230;&lt;/p&gt;


To answer your question, I am not using
&lt;pre&gt;config.after_initialize....&lt;/pre&gt;
anywhere. Once I restarted my ferret server, everything worked fine. If you&#8217;re not using a ferret server, you might want to look at reloading your index files (but I&#8217;m just guessing).</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6011</id>
    <published>2008-05-08T03:08:44Z</published>
    <updated>2008-05-08T03:08:44Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">&lt;p&gt;I have the latest aaf and didn&#8217;t need to do anything to my environment.rb.&lt;/p&gt;


	&lt;p&gt;Once I made the changes, I did restart ferret_server.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>p jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6009</id>
    <published>2008-05-08T00:36:06Z</published>
    <updated>2008-05-08T00:36:06Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by p jam</title>
<content type="html">&lt;p&gt;It&#8217;s actually the &lt;pre&gt;config.after_initialize....&lt;/pre&gt; that i am having the trouble with.&lt;/p&gt;


	&lt;p&gt;Where did you put that?  did you put that in your environment.rb? and if so, where?&lt;/p&gt;


	&lt;p&gt;i get a message saying that load_config cannot be found.  load_config is part of the plugin&#8230; but for some reason it can&#8217;t be found when initializing.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6007</id>
    <published>2008-05-07T22:27:44Z</published>
    <updated>2008-05-07T22:27:44Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">(try again)
P jam, all the code after 
&lt;pre&gt;config.after_initialize....&lt;/pre&gt;
needs to be in your controller(s) / view(s).</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6006</id>
    <published>2008-05-07T22:25:54Z</published>
    <updated>2008-05-07T22:25:54Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">P jam, all the code after
&lt;pre&gt;config.after_initialize....&amp;lt;pre&amp;gt;
needs to be in your controller(s) / view(s).</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>P jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6004</id>
    <published>2008-05-07T20:25:27Z</published>
    <updated>2008-05-07T20:25:27Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by P jam</title>
<content type="html">&lt;p&gt;also, branden, in the paragraph where you say to skip the patch , your tutorial/post goes right to more code.&lt;/p&gt;


	&lt;p&gt;Was your intent for &#8216;us&#8217; to skip that bit of code too?  it kind of just appears and then you say&#8230; now for the fun part.&lt;/p&gt;


	&lt;p&gt;1000 thank you&#8217;s if you get this working for me boss.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>P jam</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:6003</id>
    <published>2008-05-07T20:12:23Z</published>
    <updated>2008-05-07T20:12:23Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by P jam</title>
<content type="html">&lt;p&gt;you&#8217;ve gotten farther then I damon and brandon.&lt;/p&gt;


	&lt;p&gt;i get &lt;pre&gt;undefined method `load_config' for ActsAsFerret:Module (NoMethodError)&lt;/pre&gt; when i reload the server.  I did get the same message as Damon however, when i tried this yesterday without restarting the server.  i never should have restarted my server.&lt;/p&gt;


	&lt;p&gt;I&#8217;m thinking that something in trunk is borked, right now.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Damon</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:5999</id>
    <published>2008-05-07T18:28:49Z</published>
    <updated>2008-05-07T18:28:49Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Damon</title>
<content type="html">&lt;p&gt;Hi, I&#8217;m following your pattern but having problems with rendering. I have my models mapped as resources but when I call&lt;/p&gt;


&lt;pre&gt;&amp;lt;%= render :partial =&amp;gt; @results %&amp;gt;&lt;/pre&gt;

	&lt;p&gt;I get an exception, &#8220;couldn&#8217;t find template array/_arrays&#8221;&lt;/p&gt;


	&lt;p&gt;Instead of a SearchResults object, I appear to be getting a plain array returned. Any ideas?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>ynw</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:5905</id>
    <published>2008-04-30T00:38:35Z</published>
    <updated>2008-04-30T00:38:35Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by ynw</title>
<content type="html">&lt;p&gt;I have to report stability issues with Ferret. Sphinx is serving well and exposes some advanced features Ferret is lacking.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Derek</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:5904</id>
    <published>2008-04-29T23:44:55Z</published>
    <updated>2008-04-29T23:44:55Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Derek</title>
<content type="html">&lt;p&gt;Are you using Ferret on any production apps?  If so, how has it been?  I considered Ferret a few months ago, but went for Sphinx when a lot of people were saying Ferret isn&#8217;t as stable.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Ed Spencer</name>
    </author>
    <id>tag:opensoul.org,2008-04-29:5898:5901</id>
    <published>2008-04-29T17:18:04Z</published>
    <updated>2008-04-29T17:18:04Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret" rel="alternate" type="text/html"/>
    <title>Comment on 'Using shared indexes with acts_as_ferret' by Ed Spencer</title>
<content type="html">&lt;p&gt;That&#8217;s fantastic, thanks for the writeup.  Last time I look at Ferret it felt a bit contorted &#8211; this looks great though!&lt;/p&gt;


	&lt;p&gt;Any ideas about memory usage?  I seem to remember it using a lot last time I used it&#8230;&lt;/p&gt;</content>  </entry>
</feed>
