<?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>Mozilla Web Development &#187; search</title>
	<atom:link href="http://blog.mozilla.com/webdev/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.com/webdev</link>
	<description>Everybody Likes Ninjas</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:41:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Got Data? Need Search? Use Sphinx</title>
		<link>http://blog.mozilla.com/webdev/2010/01/28/got-data-need-search-use-sphinx/</link>
		<comments>http://blog.mozilla.com/webdev/2010/01/28/got-data-need-search-use-sphinx/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 20:17:25 +0000</pubDate>
		<dc:creator>James Socol</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[sphinx]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/webdev/?p=924</guid>
		<description><![CDATA[So you&#8217;ve built your web application, and people are putting data in it, but how do they get that data back out? Often, they find data by searching. MySQL provides a searchable full-text index, but it has several limitations: FULLTEXT indexes are only available on MyISAM tables. Adding FULLTEXT indexes can slow down INSERTs and [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve built your web application, and people are putting data in it,  but how do they get that data back out? Often, they find data by  searching. MySQL provides a searchable <a href="http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html">full-text index</a>, but it has  several limitations:</p>
<ul>
<li>FULLTEXT indexes are only available  on MyISAM tables.</li>
<li>Adding FULLTEXT indexes can slow down INSERTs  and UPDATEs.</li>
<li>FULLTEXT indexes can span multiple columns, but not  multiple tables of data.</li>
<li>Searching can increase the load on  your database server.</li>
</ul>
<p>Fortunately, a search system,  like Sphinx, allows you to overcome these limitations and provide  powerful, flexible, and fast search solutions.<a href="http://sphinxsearch.com/"></a></p>
<p><a href="http://sphinxsearch.com/">Sphinx</a>, in  particular, is easy to set up and use. It powers searches on both <a href="https://addons.mozilla.org/">Addons</a> and <a href="http://support.mozilla.com/">Support</a>. We honestly didn&#8217;t shop around, because we  found Sphinx did what we needed very well.</p>
<p>Because Sphinx is  external to MySQL, it doesn&#8217;t care about things like what table engine  you use, so you can perform fast, full-text searches on InnoDB tables.  It also takes the load of searching off the database, leaving it free to  retrieve all the documents your users can find. And because Sphinx  finds its data via SQL queries, indexes can collate data in several  tables.</p>
<p>How fast does Sphinx index data? For both Addons and  Support, indexing is under two minutes, which includes on the order of  10^4 documents on Addons, and on the order of 10^5 on Support. This  speed means we could easily double or triple the quantity of data before  we&#8217;d need to rethink our search strategy.</p>
<p>Sphinx typically  collects data by running SQL queries, so if you can write a query to get  your data&#8211;possibly joining data from several tables, or small, extra  queries for many-to-many relationships like tags&#8211;you&#8217;re done. If your  data isn&#8217;t in a SQL database, you can feed it data in XML. If you have  lots of data, or lots of old data that doesn&#8217;t change, you can break  this into smaller indexes, or just look at what&#8217;s changed, and merge the  data together.</p>
<p>The index includes all the text you select and  several attributes you can define, which you can use to filter results,  or to retrieve the document from the database.</p>
<p>Running searches  from your application is very flexible. PHP, Python, Ruby, and others  have ports of the search API. You can also search via a SQL interface.  There&#8217;s even a command line search binary for testing. The API can do  some pretty advanced things, like sorting, filtering, settings offsets  and result limits, or even building excerpts for your results.</p>
<p>Search  is an important part of data-driven web applications, and Sphinx is a  powerful ally in providing search capabilities. If you&#8217;ve been relying  on FULLTEXT indexes, I encourage you to try a search system like Sphinx.  And if you need help, come find us in <a href="irc://irc.mozilla.org/webdev">#webdev</a> on irc.mozilla.org.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/webdev/2010/01/28/got-data-need-search-use-sphinx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

