From db7198c521229a1f29fc63f523e4abbb9e315a69 Mon Sep 17 00:00:00 2001 From: Dave Dash Date: Wed, 30 Jun 2010 13:34:09 -0700 Subject: [PATCH] bug 574882, index summary field --- apps/amo/fixtures/base/fixtures.json | 11 +++-------- apps/search/tests/test_client.py | 4 +++- configs/sphinx/sphinx.conf | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/apps/amo/fixtures/base/fixtures.json b/apps/amo/fixtures/base/fixtures.json index a38a3f827f..7b2903418f 100644 --- a/apps/amo/fixtures/base/fixtures.json +++ b/apps/amo/fixtures/base/fixtures.json @@ -403,8 +403,7 @@ "created": "2007-03-05 13:10:22", "locale": "en-US", "modified": "2010-01-13 12:24:44", - "id": 3403, - "localized_string_clean": "Please update Gmail S/MIME to 0.4.5 for the latest updates and fixes.\n\nHelp on using this extension can be found at:\nhttp://richard.jones.name/google-hacks/gmail-smime/gmail-smime.html\nhttp://www.seantek.com/gmailsmime/\n\nPlease contact the developers directly if you have questions or problems. We do not monitor the comments on this website regularly.\n\nIf you want others to send you encrypted mail, you need a digital certificate. You can get a free one from Comodo at:\nhttp://www.instantssl.com/ssl-certificate-products/free-email-certificate.html\nJust follow the prompts to have the certificate installed directly in your browser. Sending your certificate to others is as easy as clicking \u201cSign\u201d on the toolbar. For more information, visit:\nhttp://kb.mozillazine.org/Getting_an_SMIME_certificate\n\nAlways remember to look at the toolbar before sending a message, to see whether you are signing or encrypting it. By default, messages are not signed, but are automatically encrypted if you have digital certificates for all of the recipients.\n\nSend us e-mail if you have additional questions or comments. Feel free to send us signed and encrypted e-mail, too. We can read them now. :-)" + "id": 3403 } }, { @@ -415,8 +414,7 @@ "created": "2007-03-05 13:10:22", "locale": "en-US", "modified": "2009-03-21 16:36:56", - "id": 3404, - "localized_string_clean": "Send and receive signed and encrypted messages in Gmail." + "id": 3404 } }, { @@ -463,15 +461,13 @@ "created": "2007-03-05 13:10:22", "locale": "en-US", "modified": "2009-03-21 16:36:56", - "id": 3400, - "localized_string_clean": null + "id": 3400 } }, { "pk": 426, "model": "translations.translation", "fields": { - "localized_string_clean": null, "created": "2007-03-05 13:08:05", "locale": "en-US", "modified": "2007-03-22 21:54:38", @@ -483,7 +479,6 @@ "pk": 258, "model": "translations.translation", "fields": { - "localized_string_clean": null, "created": "2007-03-05 13:08:05", "locale": "en-US", "modified": "2007-03-22 21:54:38", diff --git a/apps/search/tests/test_client.py b/apps/search/tests/test_client.py index 55e4e7ec1c..414fd98845 100644 --- a/apps/search/tests/test_client.py +++ b/apps/search/tests/test_client.py @@ -15,6 +15,7 @@ from search.client import (extract_from_query, get_category_id, PersonasClient, SearchError, ) from search.tests import SphinxTestCase + def test_extract_from_query(): """Test that the correct terms are extracted from query strings.""" @@ -222,4 +223,5 @@ class SearchTest(SphinxTestCase): except SearchError: # pragma: no cover assert False, "Error querying for %s" % guy - + def test_summary(self): + eq_(query("Evar")[0].id, 3615) # Should get us Delicious diff --git a/configs/sphinx/sphinx.conf b/configs/sphinx/sphinx.conf index b36600a334..d2f107b8b2 100755 --- a/configs/sphinx/sphinx.conf +++ b/configs/sphinx/sphinx.conf @@ -37,7 +37,7 @@ source addons id, app, addon_id, type, status as addon_status, locale, \ locale_ord, averagerating, weeklydownloads, totaldownloads, \ inactive, guid_ord, name, UPPER(name) AS name_ord, \ - homepage, description, developercomments, \ + homepage, description, summary, developercomments, \ ( \ SELECT 1 FROM features f \ WHERE f.addon_id=t.addon_id \