<p>I'm building a Django project that needs search functionality, and until there's a <code>django.contrib.search</code>, I have to choose a search app. So, which is the best? By "best" I mean...</p>

<ul>
<li>easy to install / set up</li>
<li>has a Django- or at least Python-friendly API</li>
<li>can perform reasonably complex searches</li>
</ul>

<p>Here are some apps I've heard of, please suggest others if you know of any:</p>

<ul>
<li><a href="http://code.google.com/p/djangosearch/" rel="noreferrer">djangosearch</a></li>
<li><a href="http://code.google.com/p/django-sphinx/" rel="noreferrer">django-sphinx</a></li>
</ul>

<p>I'd also like to avoid using a third-party search engine (like Google SiteSearch), because some of the data I'd like to index is for site members only and should not be public.</p>

[{'answer_id': 55924, 'author': 'Garth Kidd', 'author_id': 5700, 'author_profile': 'https://Stackoverflow.com/users/5700', 'pm_score': 4, 'selected': False, 'text': '<p>Justin, I\'d try <a href="http://code.google.com/p/djangosearch/" rel="noreferrer">djangosearch</a> first: Jacob Kaplan-Moss (Django\'s lead developer) is working on it. </p>\n\n<p>Potential hazards: </p>\n\n<ul>\n<li>The home page warns the API might not be entirely stable</li>\n</ul>\n\n<p>Potential benefits:</p>\n\n<ul>\n<li>“The long term goal is for this to become <code>django.contrib.search</code>.”</li>\n</ul>\n'}, {'answer_id': 56885, 'author': 'Justin Voss', 'author_id': 5616, 'author_profile': 'https://Stackoverflow.com/users/5616', 'pm_score': 3, 'selected': False, 'text': '<p>Thanks Garth. I had seen that djangosearch wanted to become the official Django search, but I was hesitant to use it because I couldn\'t find any documentation! Luckily, there\'s a <a href="http://code.google.com/p/djangosearch/source/browse/branches/soc-new-backends/doc/README.txt" rel="noreferrer">README in subversion</a> that I hadn\'t seen before, and it makes the API look very cool:</p>\n\n<pre><code># set up the model\nclass Event(models.Model):\n    title = models.CharField(max_length=255)\n    date = models.DateField()\n    is_outdoors = models.BooleanField()\n\n    index = djangosearch.ModelIndex(text=[\'title\'], \n                                    additional=[\'date\', \'is_outdoors\'])\n\n# run a search\nresults = Event.index.search("django conference")\n</code></pre>\n'}, {'answer_id': 86906, 'author': 'zgoda', 'author_id': 12138, 'author_profile': 'https://Stackoverflow.com/users/12138', 'pm_score': 1, 'selected': False, 'text': '<p>If you have large amount of data to be indexed or you expect high traffic, I\'d suggest using some external search engine, like <a href="http://lucene.apache.org/solr/" rel="nofollow noreferrer">Solr</a>. This way, you\'ll keep <em>shared-nothing</em> approach and be able to scale your site components independently.</p>\n'}, {'answer_id': 210229, 'author': 'davidhund', 'author_id': 28726, 'author_profile': 'https://Stackoverflow.com/users/28726', 'pm_score': 4, 'selected': False, 'text': '<p>I am searching for the same thing, as are a lot of other people. Let\'s hope that <em>django.contrib.search</em> will be added soon.</p>\n\n<p>In the meantime, this is what I found:</p>\n\n<ul>\n<li><a href="http://code.google.com/p/djangosearch/" rel="noreferrer">http://code.google.com/p/djangosearch/</a></li>\n<li><a href="http://code.google.com/p/django-sphinx/" rel="noreferrer">http://code.google.com/p/django-sphinx/</a></li>\n<li><a href="http://code.google.com/p/djapian/" rel="noreferrer">http://code.google.com/p/djapian/</a></li>\n<li><a href="http://code.google.com/p/django-search-lucene/" rel="noreferrer">http://code.google.com/p/django-search-lucene/</a></li>\n<li><a href="http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/" rel="noreferrer">http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/</a></li>\n</ul>\n\n<p>To me, most look quite complicated and, frankly, a little daunting to implement.\nI\'d be interested to learn what you think of these.</p>\n'}, {'answer_id': 231286, 'author': 'Joe W.', 'author_id': 3459, 'author_profile': 'https://Stackoverflow.com/users/3459', 'pm_score': 3, 'selected': False, 'text': "<p>I'd recommend Sphinx for full-text search and aggregation, and django-sphinx is good enough for production use.  We found that Sphinx was the least resource-intensive and fastest way to index and search our documents and that django-sphinx was a nice wrapper on top of the sphinx client.</p>\n\n<p>The group by aggregation is particularly nice, if for example you want to display how many documents with a certain tag or by a certain author (or both) matched a search.  In memory attribute updates were convenient too, especially for removing deleted articles immediately.</p>\n"}, {'answer_id': 232735, 'author': 'davidhund', 'author_id': 28726, 'author_profile': 'https://Stackoverflow.com/users/28726', 'pm_score': 0, 'selected': False, 'text': "<p>Thanks Joe,</p>\n\n<p>We decided to go with Tsearch2 and a custom postgres adaptor. Tsearch2 does not need an extra process to run, which was convenient since we are on a WebFaction hosting with limited  memory... It's not completely done yet, but seems to be a good solution...</p>\n"}, {'answer_id': 484103, 'author': 'vvarp', 'author_id': 42786, 'author_profile': 'https://Stackoverflow.com/users/42786', 'pm_score': 2, 'selected': False, 'text': '<p>It looks like everyone here missed <a href="https://launchpad.net/django-xappy" rel="nofollow noreferrer">django-xappy</a></p>\n\n<p>After quick evaluation of all existing search addons for Django, I found this one as most flexible and easiest to use. It\'s rough on the edges in few places, but it\'s still the best way to use power of <a href="http://xapian.org" rel="nofollow noreferrer">Xapian</a> search engine inside Django projects.</p>\n'}, {'answer_id': 748247, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>I found <a href="http://github.com/idangazit/djoosh/tree/master" rel="nofollow noreferrer">Djoosh</a> which relies on the pure-python external search engine <a href="http://whoosh.ca/" rel="nofollow noreferrer">Whoosh</a> to work well with my \'Python\' brain.</p>\n'}, {'answer_id': 750442, 'author': 'ahagenbruch', 'author_id': 62882, 'author_profile': 'https://Stackoverflow.com/users/62882', 'pm_score': 2, 'selected': False, 'text': '<p>You might want to look at <a href="http://code.google.com/p/django-solr-search/" rel="nofollow noreferrer">Django Solr search</a> (aka "Solango") which comes with some nice documentation to get you started...</p>\n'}, {'answer_id': 790298, 'author': 'Gourneau', 'author_id': 56069, 'author_profile': 'https://Stackoverflow.com/users/56069', 'pm_score': 2, 'selected': False, 'text': '<p>You might want to consider letting Yahoo do all the hard work with their Build your own Search Service (BOSS).  Here is a great blog post that walks you through the process:\n<a href="http://www.peterkrantz.com/2008/yahoo-search-in-django/" rel="nofollow noreferrer">http://www.peterkrantz.com/2008/yahoo-search-in-django/</a></p>\n'}, {'answer_id': 840596, 'author': 'kpw', 'author_id': 322324, 'author_profile': 'https://Stackoverflow.com/users/322324', 'pm_score': 8, 'selected': True, 'text': '<p>Check out <a href="http://haystacksearch.org/" rel="noreferrer">Haystack Search</a> - a new model based search abstraction layer that currently supports <a href="http://xapian.org/" rel="noreferrer">Xapian</a>, <a href="http://lucene.apache.org/solr/" rel="noreferrer">Solr</a> and <a href="https://bitbucket.org/mchaput/whoosh/wiki/Home" rel="noreferrer">Whoosh</a>. Looks like it\'s well supported and documented.</p>\n'}, {'answer_id': 844134, 'author': 'Joe Germuska', 'author_id': 102476, 'author_profile': 'https://Stackoverflow.com/users/102476', 'pm_score': 3, 'selected': False, 'text': '<p>The google code page for <a href="http://code.google.com/p/djangosearch/" rel="noreferrer">djangosearch</a> indicates that it is no longer under active development, and suggests <a href="http://haystacksearch.org/" rel="noreferrer">haystack</a> or <a href="http://code.google.com/p/django-solr-search/" rel="noreferrer">solango</a>.</p>\n'}, {'answer_id': 933071, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': "<p>I think I am going to have to give a shout out to Djapian.</p>\n\n<p>It is rock-solid...just pull down a source distribution and peek inside. Top notch code, not very many comments tho..</p>\n\n<p>It's still a young software project, but I think the django community should throw it's weight behind this one.</p>\n"}, {'answer_id': 5761015, 'author': 'odinho - Velmont', 'author_id': 179978, 'author_profile': 'https://Stackoverflow.com/users/179978', 'pm_score': 3, 'selected': False, 'text': '<p>I just needed a <strong>very quick</strong> solution that was no-fuss for an internal app.</p>\n\n<p>I found the article <a href="http://julienphalip.com/post/2825034077/adding-search-to-a-django-site-in-a-snap" rel="noreferrer">Adding search to Django in a snap</a>, and that worked splendid for me! </p>\n\n<p>Obviously it lacks the speed, scalability and features of the real projects like Haystack, but this one is easier to set up, and I don\'t really need anything else than keyword AND-search.</p>\n'}, {'answer_id': 10572894, 'author': 'jaap3', 'author_id': 769308, 'author_profile': 'https://Stackoverflow.com/users/769308', 'pm_score': 0, 'selected': False, 'text': '<p>If you are willing to use a 3rd party search engine I can recommend <a href="http://developer.yahoo.com/search/boss/" rel="nofollow">Yahoo BOSS</a> and <a href="https://bitbucket.org/jaap3/django-bosssearch/" rel="nofollow">django-bosssearch</a>.</p>\n\n<p>Yahoo BOSS is a paid service, but it saves you setting up and maintaining other search software on your server.</p>\n'}]
['https://Stackoverflow.com/questions/55056', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5616/']