<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code Iteratively &#187; search</title>
	<atom:link href="http://iterat.ive.ly/index.php/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://iterat.ive.ly</link>
	<description>code. cycling. music.</description>
	<lastBuildDate>Sat, 04 Sep 2010 09:31:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Sphinx Search C# .NET Client&#160;API</title>
		<link>http://iterat.ive.ly/index.php/2008/01/05/sphinx-search-c-net-client-api/</link>
		<comments>http://iterat.ive.ly/index.php/2008/01/05/sphinx-search-c-net-client-api/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 06:04:03 +0000</pubDate>
		<dc:creator>Christopher Gooley</dc:creator>
				<category><![CDATA[dot.net]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://iterat.ive.ly/index.php/2008/01/05/sphinx-search-c-net-client-api/</guid>
		<description><![CDATA[Need a C# native client API for Sphinx Search to use in your C# or VB ASP.NET projects? So did I, so I wrote one. Yesterday, I found Sphinx Search and decided to try implementing it in place of the (horrid) MySql Fulltext searching for my Photocore project. After downloading the binaries and indexing a [...]]]></description>
			<content:encoded><![CDATA[<p>Need a C# native client API for <a href="http://sphinxsearch.com">Sphinx Search</a> to use in your C# or VB ASP.NET projects?  So did I, so I wrote one.</p>
<p>Yesterday, I found Sphinx Search and decided to try implementing it in place of the (horrid) MySql Fulltext searching for my <a href="http://photocore.us">Photocore</a> project.  After downloading the binaries and indexing a couple million rows of metadata, I was amazed at how well it performs.  It indexed all my data in less than a minute (compared to the 30 minutes required by MySql Fulltext) and I haven&#8217;t come up with a search that takes longer than 0.005 seconds. I was hooked immediately.  So I needed a .NET API because I didn&#8217;t want to patch my database server to use the Sphinx plugin.</p>
<p>Source download after the jump.<br />
<span id="more-36"></span></p>
<p class="download">Download v0.2 <a href="http://files.thegooley.com/SphinxSearchApiSrc-0.9.8-dev-2.zip">source</a> | <a href="http://files.thegooley.com/SphinxSearchApiBin-0.9.8-dev-2.zip">binaries</a></p>
<p>Download has no warranties, blah, blah, blah.  It&#8217;s based on the Java API and is released under the GNU GPL license.</p>
<p><strong>Important Note</strong><br />
It does not have all the features implemented.  Most notably, it does not have support for Exceprts.  If you modify code to make it work, send it back and I&#8217;ll post the updated version here.  Or, if I get enough requests to implement it, I might.  But my use of Sphinx does not include excerpts, so I didn&#8217;t bother at this point.</p>
<p><strong>Other Notes</strong><br />
This is a pretty quick-and-dirty project, I&#8217;ll proabably clean it up over time and repost new versions, but for now make sure you test it thoroughly before putting it into production on your own sites.  That&#8217;s your responsibility&#8230;</p>
<p>It is tested against the Sphinx searchd server version 0.9.8-dev running on both linux (ubuntu) and windows (vista) with simple queries only.  I didn&#8217;t do anything fancy in my queries.</p>
<p>It does not work against 0.9.7 or earlier because those did not support multiple queries.  It <em>should</em> work against future versions of Sphinx server.  No promises though.</p>
<p><strong>Usage</strong><br />
Super-simple to use after you have a searchd server running with an index.  Three lines will do a search for &#8220;rose bowl gooley&#8221; matching any index (&#8220;*&#8221;) and will get the second page of results (items 41-80) with a max result count of 10,000 documents.</p>
<pre>
// set hostname and port defaults
SphinxClient cli = new SphinxClient(hostname, 3312);

// set the pagination params
// (this is page 2, 40 per page, 10000 max)
cli.SetLimits(40, 40, 10000);

// define the query and index
// ("*" means any index)
cli.AddQuery("rose bowl gooley", "*");

// run the query and get the results
SphinxResult[] results = cli.RunQueries();
</pre>
<p>The SphinxResult object contains an array of SphinxMatches which will provide you with the DocumentId numbers for all matches.  Simple as that.</p>
<p>Happy searching!</p>
]]></content:encoded>
			<wfw:commentRss>http://iterat.ive.ly/index.php/2008/01/05/sphinx-search-c-net-client-api/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
