<?xml version="1.0" encoding="UTF-8"?>
<posts type="array">
  <post>
    <checksum>2c2cfc88568032fe8e01666995cd47f2</checksum>
    <content>Is alive!

Check it out at [langalot.com](http://langalot.com)</content>
    <content-html>&lt;p&gt;Is alive!&lt;/p&gt;

&lt;p&gt;Check it out at &lt;a href=&quot;http://langalot.com&quot;&gt;langalot.com&lt;/a&gt;&lt;/p&gt;
</content-html>
    <created-at type="datetime">2009-05-22T22:10:12Z</created-at>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <id type="integer">232</id>
    <page-views type="integer">256</page-views>
    <person-id type="integer">2</person-id>
    <site-id type="integer">3</site-id>
    <title>Langalot...</title>
    <updated-at type="datetime">2010-03-11T13:48:45Z</updated-at>
  </post>
  <post>
    <checksum>cb5fda7fb408d3e5b3fe6b551505edb6</checksum>
    <content>[Thinking Sphinx](http://ts.freelancing-gods.com/) is great, absolutely the
best [sphinx](http://sphinxsearch.com/) plugin for ActiveRecord (and thus
Rails) out there.  Enabling infix/star searching isn't readily apparent in
the docs.  Infix/star searching allows a search for &quot;ren&quot; to match &quot;French&quot;,
&quot;wrench&quot;, &quot;Ren&quot;, &quot;rent&quot;, etc.  Without it enabled, a search for &quot;ren&quot; will
only return exact matches (from the previous list, only &quot;Ren&quot; would match).


To enable it for all your models, create `RAILS_ROOT/config/sphinx.yml` with
something like the following:

    development:
      enable_star: 1
      min_infix_len: 3

    testing:
      enable_star: 1
      min_infix_len: 3

    production:
      enable_star: 1
      min_infix_len: 3

Reindex and restart sphinx.  Now if you do a search for `*ren*`, you'll get
everything that matches.  If you want to always surround your queries with
stars, you can add `:star =&gt; true` to your method call:

    @words = Word.search(params[:q], :page =&gt; params[:page], :star =&gt; true)

This will obviously make your index bigger and make index generation take
longer.  Increasing the size of `min_infix_len` will make the index smaller.</content>
    <content-html>&lt;p&gt;&lt;a href=&quot;http://ts.freelancing-gods.com/&quot;&gt;Thinking Sphinx&lt;/a&gt; is great, absolutely the
best &lt;a href=&quot;http://sphinxsearch.com/&quot;&gt;sphinx&lt;/a&gt; plugin for ActiveRecord (and thus
Rails) out there.  Enabling infix/star searching isn&amp;rsquo;t readily apparent in
the docs.  Infix/star searching allows a search for &amp;ldquo;ren&amp;rdquo; to match &amp;ldquo;French&amp;rdquo;,
&amp;ldquo;wrench&amp;rdquo;, &amp;ldquo;Ren&amp;rdquo;, &amp;ldquo;rent&amp;rdquo;, etc.  Without it enabled, a search for &amp;ldquo;ren&amp;rdquo; will
only return exact matches (from the previous list, only &amp;ldquo;Ren&amp;rdquo; would match).&lt;/p&gt;

&lt;p&gt;To enable it for all your models, create &lt;code&gt;RAILS_ROOT/config/sphinx.yml&lt;/code&gt; with
something like the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;development:
  enable_star: 1
  min_infix_len: 3

testing:
  enable_star: 1
  min_infix_len: 3

production:
  enable_star: 1
  min_infix_len: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Reindex and restart sphinx.  Now if you do a search for &lt;code&gt;*ren*&lt;/code&gt;, you&amp;rsquo;ll get
everything that matches.  If you want to always surround your queries with
stars, you can add &lt;code&gt;:star =&amp;gt; true&lt;/code&gt; to your method call:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@words = Word.search(params[:q], :page =&amp;gt; params[:page], :star =&amp;gt; true)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will obviously make your index bigger and make index generation take
longer.  Increasing the size of &lt;code&gt;min_infix_len&lt;/code&gt; will make the index smaller.&lt;/p&gt;
</content-html>
    <created-at type="datetime">2009-03-05T23:31:51Z</created-at>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <id type="integer">199</id>
    <page-views type="integer">596</page-views>
    <person-id type="integer">2</person-id>
    <site-id type="integer">3</site-id>
    <title>Infix/Star searching with Thinking Sphinx</title>
    <updated-at type="datetime">2010-03-10T19:05:25Z</updated-at>
  </post>
  <post>
    <checksum>aa9419f2183d376577e0d20168fa28cc</checksum>
    <content>Apple approved our first iPhone application, [ChatterBox](
http://xblabs.com/chatterbox/index.html)!  It's a fun little application
that makes your iPhone say anything you type into it, in a lo-fi robotic
voice.  The text-to-speech isn't perfect and the voice is a few decades
behind current technology, which just makes it more fun.</content>
    <content-html>&lt;p&gt;Apple approved our first iPhone application, &lt;a href=&quot;http://xblabs.com/chatterbox/index.html&quot;&gt;ChatterBox&lt;/a&gt;!  It&amp;rsquo;s a fun little application
that makes your iPhone say anything you type into it, in a lo-fi robotic
voice.  The text-to-speech isn&amp;rsquo;t perfect and the voice is a few decades
behind current technology, which just makes it more fun.&lt;/p&gt;
</content-html>
    <created-at type="datetime">2009-01-29T18:42:40Z</created-at>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <id type="integer">103</id>
    <page-views type="integer">358</page-views>
    <person-id type="integer">2</person-id>
    <site-id type="integer">3</site-id>
    <title>ChatterBox</title>
    <updated-at type="datetime">2010-03-11T05:20:52Z</updated-at>
  </post>
</posts>
