Merge lp:~lifeless/launchpad/malone into lp:launchpad

Proposed by Robert Collins on 2010-07-25
Status: Merged
Approved by: Michael Hudson-Doyle on 2010-07-25
Approved revision: no longer in the source branch.
Merged at revision: 11277
Proposed branch: lp:~lifeless/launchpad/malone
Merge into: lp:launchpad
Diff against target: 525 lines (+107/-69)
15 files modified
lib/canonical/database/nl_search.py (+19/-8)
lib/canonical/launchpad/doc/textsearching.txt (+17/-9)
lib/lp/answers/doc/emailinterface.txt.disabled (+1/-1)
lib/lp/answers/doc/faq-vocabulary.txt (+2/-2)
lib/lp/answers/doc/faqtarget.txt (+0/-1)
lib/lp/answers/doc/questiontarget.txt (+0/-4)
lib/lp/answers/stories/project-add-question.txt (+1/-1)
lib/lp/answers/stories/question-add-in-other-languages.txt (+12/-4)
lib/lp/answers/stories/question-add.txt (+10/-1)
lib/lp/answers/stories/this-is-a-faq.txt (+23/-8)
lib/lp/bugs/doc/bugtask-find-similar.txt (+8/-5)
lib/lp/bugs/doc/bugtask.txt (+0/-10)
lib/lp/bugs/stories/guided-filebug/xx-distro-guided-filebug.txt (+5/-1)
lib/lp/bugs/stories/guided-filebug/xx-product-guided-filebug.txt (+3/-3)
lib/lp/bugs/stories/guided-filebug/xx-sorting-by-relevance.txt (+6/-11)
To merge this branch: bzr merge lp:~lifeless/launchpad/malone
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve on 2010-08-02
Michael Hudson-Doyle 2010-07-25 Approve on 2010-07-25
Review via email: mp+30904@code.launchpad.net

Description of the Change

Further improve the performance of bug duplicate detection by switching from | (any term matches) to & (all terms must match), with an expansion to handle one missing term.

This reduces over 90% of the overhead in tests so far, taking a 8second operation(on staging) down to 800msec.

I'm putting this up for review now to get feedback on the changes; I'm going to spin it up on staging and see if it delivers what it looks like it promises.

To post a comment you must log in.
Michael Hudson-Doyle (mwhudson) wrote :

Is there a bug or spec you can reference in the XXX comments about introducing a better search? Otherwise it's fine.

review: Approve
Robert Collins (lifeless) wrote :

I will file a bug and reference before landing.

Tim Penhey (thumper) wrote :

u'(firefox&flickr&slow)|(flickr&slow)|(firefox&slow)|(firefox&flickr)'

Why have the (firefox&flickr&slow) term?

It will be covered by the other three.

Robert Collins (lifeless) wrote :

On Mon, Jul 26, 2010 at 2:53 AM, Tim Penhey <email address hidden> wrote:
> u'(firefox&flickr&slow)|(flickr&slow)|(firefox&slow)|(firefox&flickr)'
>
> Why have the (firefox&flickr&slow) term?
>
> It will be covered by the other three.

Ideally we'd iterate over the f&f&s, then the other terms, and expand
further. As for why, here - the same phrase is overloaded and used for
ranking, which means we do want the semantic statement as much/more
than the baseline work.

-Rob

Tim Penhey (thumper) wrote :

Changes look fine, although I'd love to see the doctest rewritten so it doesn't use sample data.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/database/nl_search.py'
2--- lib/canonical/database/nl_search.py 2010-07-21 19:55:38 +0000
3+++ lib/canonical/database/nl_search.py 2010-08-02 02:36:50 +0000
4@@ -73,17 +73,28 @@
5 def _nl_phrase_search(terms, table, constraints, extra_constraints_tables):
6 """Perform a very simple pruning of the phrase, letting fti do ranking.
7
8+ This function groups the terms with & clause, and creates an additional
9+ & grouping for each subset of terms created by discarding one term.
10+
11 See nl_phrase_search for the contract of this function.
12 """
13- bad_words = set(['firefox', 'ubuntu', 'launchpad'])
14 terms = set(terms)
15- filtered_terms = []
16- for term in terms:
17- if term.lower() in bad_words:
18- continue
19- filtered_terms.append(term)
20- # sorted for testing convenience.
21- return '|'.join(sorted(filtered_terms))
22+ # Special cased because in the two-term case there is no benefit by having
23+ # a more complex rank & search function.
24+ # sorted for doctesting convenience - should have no impact on tsearch2.
25+ if len(terms) < 3:
26+ return '|'.join(sorted(terms))
27+ # Expand
28+ and_groups = [None] * (len(terms) + 1)
29+ for pos in range(len(terms) + 1):
30+ and_groups[pos] = set(terms)
31+ # sorted for doctesting convenience - should have no impact on tsearch2.
32+ for pos, term in enumerate(sorted(terms)):
33+ and_groups[pos + 1].discard(term)
34+ # sorted for doctesting convenience - should have no impact on tsearch2.
35+ and_clauses = ['(' + '&'.join(sorted(group)) + ')'
36+ for group in and_groups]
37+ return '|'.join(and_clauses)
38
39
40 def _slow_nl_phrase_search(terms, table, constraints,
41
42=== modified file 'lib/canonical/launchpad/doc/textsearching.txt'
43--- lib/canonical/launchpad/doc/textsearching.txt 2010-07-21 19:55:38 +0000
44+++ lib/canonical/launchpad/doc/textsearching.txt 2010-08-02 02:36:50 +0000
45@@ -549,10 +549,12 @@
46 tsearch2 to_tsquery() already removes stop-words (it also stems the
47 words). Relevance can be computed using the rank() or rank_cd()
48 functions. These are not TD-IDF scoring functions, but they take into
49-accounts where the words appeared (in the case of rank()) or proximity
50+account where the words appeared (in the case of rank()) or proximity
51 of the words (in the case of rank_cd()). Both scoring functions can
52 normalize based on document length. So the only part left to implement
53-is the >50% filtering part.
54+is the >50% filtering part. Howevert the > 50% filtering is very expensive,
55+and so is processing every single returned item (> 200000 for common queries
56+on Ubuntu) - so we are disabling this and reworking from the ground up.
57
58
59 === nl_term_candidates() ===
60@@ -622,11 +624,17 @@
61 >>> nl_phrase_search('how do I do this?', Question)
62 ''
63
64-The fast code path only removes firefox, ubuntu and launchpad today:
65+The fast code path does not remove any terms. Rather it uses an & query over
66+all the terms combined with an & query for each ordinal-1 subset of the terms:
67
68 >>> nl_phrase_search('system is slow when running firefox on ubuntu',
69 ... Question)
70- u'run|slow|system'
71+ u'(firefox&run&slow&system&ubuntu)|(run&slow&system&ubuntu)|(firefox&slow&system&ubuntu)|(firefox&run&system&ubuntu)|(firefox&run&slow&ubuntu)|(firefox&run&slow&system)'
72+
73+Short queries are expanded more simply:
74+
75+ >>> nl_phrase_search('system is slow', Question)
76+ u'slow|system'
77
78
79 ==== Using other constraints ====
80@@ -655,10 +663,10 @@
81 ... ['Product'], fast_enabled=False)
82 u'slow|flickr'
83
84-When the query only has stop words or common words in it, the returned
85-query will be the empty string:
86+When the query only has stop words in it, the returned query will be the empty
87+string:
88
89- >>> nl_phrase_search('ubuntu will not do it', Question)
90+ >>> nl_phrase_search('will not do it', Question)
91 ''
92
93 When there are no candidate rows, only stemming and stop words removal
94@@ -668,7 +676,7 @@
95 0
96 >>> nl_phrase_search('firefox is very slow on flickr', Question,
97 ... 'product = -1')
98- u'flickr|slow'
99+ u'(firefox&flickr&slow)|(flickr&slow)|(firefox&slow)|(firefox&flickr)'
100
101
102 ==== No keywords filtering with few rows ====
103@@ -705,4 +713,4 @@
104 ... 'firefox is slow', Question,
105 ... 'distribution = %s AND sourcepackagename = %s' % sqlvalues(
106 ... ubuntu, firefox_package.sourcepackagename))
107- u'slow'
108+ u'firefox|slow'
109
110=== modified file 'lib/lp/answers/doc/emailinterface.txt.disabled'
111--- lib/lp/answers/doc/emailinterface.txt.disabled 2010-07-28 17:25:30 +0000
112+++ lib/lp/answers/doc/emailinterface.txt.disabled 2010-08-02 02:36:50 +0000
113@@ -1,6 +1,6 @@
114 = Answer Tracker Email Interface =
115
116-The Answer TRacker has an email interface, although it's quite limited
117+The Answer Tracker has an email interface, although it's quite limited
118 at the moment. The only thing you can do is post new messages on the
119 question. This is an important feature, though, since it ensures that if
120 a user decides to reply to a question notification, his email won't be
121
122=== modified file 'lib/lp/answers/doc/faq-vocabulary.txt'
123--- lib/lp/answers/doc/faq-vocabulary.txt 2010-01-12 19:02:09 +0000
124+++ lib/lp/answers/doc/faq-vocabulary.txt 2010-08-02 02:36:50 +0000
125@@ -75,7 +75,7 @@
126
127 >>> from zope.security import proxy
128 >>> from canonical.launchpad.webapp.vocabulary import CountableIterator
129- >>> terms = vocabulary.searchForTerms('Problem showing SVG')
130+ >>> terms = vocabulary.searchForTerms('extensions')
131 >>> proxy.isinstance(terms, CountableIterator)
132 True
133 >>> terms.count()
134@@ -83,6 +83,6 @@
135 >>> for term in terms:
136 ... print term.title
137 How do I troubleshoot problems with extensions/themes?
138- How do I install Java?
139+ How do I install Extensions?
140
141
142
143=== modified file 'lib/lp/answers/doc/faqtarget.txt'
144--- lib/lp/answers/doc/faqtarget.txt 2010-07-28 16:56:05 +0000
145+++ lib/lp/answers/doc/faqtarget.txt 2010-08-02 02:36:50 +0000
146@@ -175,7 +175,6 @@
147 >>> for faq in target.findSimilarFAQs('How do I use the Answer Tracker'):
148 ... print faq.title
149 How to answer a question
150- How to use bug mail
151 How to become a Launchpad king
152
153 The results are ordered by relevancy. The first document is considered
154
155=== modified file 'lib/lp/answers/doc/questiontarget.txt'
156--- lib/lp/answers/doc/questiontarget.txt 2010-07-28 16:56:05 +0000
157+++ lib/lp/answers/doc/questiontarget.txt 2010-08-02 02:36:50 +0000
158@@ -359,10 +359,6 @@
159 ... print t.title
160 New question
161 Another question
162- Question title3
163- Question title2
164- Question title1
165- Question title0
166
167
168
169
170=== modified file 'lib/lp/answers/stories/project-add-question.txt'
171--- lib/lp/answers/stories/project-add-question.txt 2010-04-16 15:06:55 +0000
172+++ lib/lp/answers/stories/project-add-question.txt 2010-08-02 02:36:50 +0000
173@@ -62,7 +62,7 @@
174 Firefox in English regarding SVG.
175
176 >>> user_browser.getControl('Summary').value = (
177- ... 'Problem displaying complex SVG')
178+ ... 'Problem with SVG')
179 >>> user_browser.getControl('Continue').click()
180
181 He's shown a list of similar questions related to the product Firefox
182
183=== modified file 'lib/lp/answers/stories/question-add-in-other-languages.txt'
184--- lib/lp/answers/stories/question-add-in-other-languages.txt 2010-07-22 05:48:07 +0000
185+++ lib/lp/answers/stories/question-add-in-other-languages.txt 2010-08-02 02:36:50 +0000
186@@ -41,10 +41,18 @@
187 understood by any member of the support community.
188
189 >>> similar_questions = find_tag_by_id(browser.contents, 'similar-questions')
190- >>> for row in similar_questions.findAll('tr', 'noted'):
191- ... row.first('a').renderContents()
192- 'Installation of Java Runtime Environment for Mozilla'
193- 'Problema al recompilar kernel con soporte smp (doble-n\xc3\xbacleo)'
194+
195+ XXX: Making search fast has a significant impact on this tests' use case,
196+ because there are 9 terms - the query has to ignore 7 of the terms to
197+ permit a hit under the new & based logic (which is needed for scaling).
198+ When we push better relevance and cheap ordering into the core we will be
199+ able to test this case again. Note that in production this exact use case
200+ already finds nothing.
201+
202+ #>>> for row in similar_questions.findAll('tr', 'noted'):
203+ #... row.first('a').renderContents()
204+ #'Installation of Java Runtime Environment for Mozilla'
205+ #'Problema al recompilar kernel con soporte smp (doble-n\xc3\xbacleo)'
206
207 >>> for tag in find_tags_by_class(browser.contents, 'warning message'):
208 ... print tag.renderContents()
209
210=== modified file 'lib/lp/answers/stories/question-add.txt'
211--- lib/lp/answers/stories/question-add.txt 2010-07-22 05:48:07 +0000
212+++ lib/lp/answers/stories/question-add.txt 2010-08-02 02:36:50 +0000
213@@ -66,8 +66,17 @@
214 The user enters his problem summary and a list of similar FAQs and
215 questions are displayed.
216
217+XXX: Original search, disabled due to performance issues RBC 20100725. This
218+will be reinstated when cheap relevance filtering is available / when search
219+is overhauled.
220+
221 >>> user_browser.getControl('Summary').value = (
222 ... 'Visiting a web page requiring java crashes firefox')
223+
224+For now, use a closer search:
225+
226+ >>> user_browser.getControl('Summary').value = (
227+ ... 'java web pages')
228 >>> user_browser.getControl('Continue').click()
229 >>> contents = find_main_content(user_browser.contents)
230 >>> similar_faqs = contents.find(id='similar-faqs')
231@@ -122,7 +131,7 @@
232 summary he provided.
233
234 >>> user_browser.getControl('Summary').value
235- 'Visiting a web page requiring java crashes firefox'
236+ 'java web pages'
237
238 If the user doesn't provide details, he'll get an error message:
239
240
241=== modified file 'lib/lp/answers/stories/this-is-a-faq.txt'
242--- lib/lp/answers/stories/this-is-a-faq.txt 2009-12-05 17:10:59 +0000
243+++ lib/lp/answers/stories/this-is-a-faq.txt 2010-08-02 02:36:50 +0000
244@@ -6,6 +6,22 @@
245 (a.k.a. Frequently Asked Question - FAQ) which can be used to answer
246 a particular question.
247
248+== Fix up sample data ==
249+
250+The sample data has question titles which perform poorly with the sample data's
251+answers in fulltext searching, using efficient tsearch2 queries; we are going
252+to overhaul the fulltext search implementation but in the interim less prose
253+permits better matching. See bug 612384.
254+
255+ >>> from zope.component import getUtility
256+ >>> from lp.registry.interfaces.product import IProductSet
257+ >>> from lp.testing import login, logout
258+ >>> login('test@canonical.com')
259+ >>> firefox = getUtility(IProductSet)['firefox']
260+ >>> svg_question = firefox.getQuestion(2)
261+ >>> svg_question.title = 'SVG extension'
262+ >>> logout()
263+
264
265 == Linking to a FAQ ==
266
267@@ -51,7 +67,7 @@
268 >>> printFAQOptions(user_browser.contents)
269 (*) No existing FAQs are relevant
270 ( ) 9: How do I troubleshoot problems with extensions/themes?
271- ( ) 7: How do I install Java?
272+ ( ) 8: How do I install Extensions?
273
274 >>> print user_browser.getLink('How do I troubleshoot problems').url
275 http://answers.launchpad.dev/firefox/+faq/9
276@@ -61,13 +77,13 @@
277
278 >>> search_field = user_browser.getControl(name='field.faq-query')
279 >>> print search_field.value
280- Problem showing the SVG demo on W3C site
281+ SVG extension
282
283 From the titles, it doesn't seem like one of these FAQs would be
284 appropriate. The user can modify the search query and hit the 'Search'
285 button to update the list of available choices:
286
287- >>> search_field.value = 'Where can I find a SVG plugin'
288+ >>> search_field.value = 'SVG plugin'
289 >>> user_browser.getControl('Search', index=0).click()
290
291 The page is updated with a new list of FAQs:
292@@ -78,7 +94,6 @@
293 (*) No existing FAQs are relevant
294 ( ) 10: How do I install plugins (Shockwave, QuickTime, etc.)?
295 ( ) 7: How do I install Java?
296- ( ) 8: How do I install Extensions?
297
298 The most relevant result seems like the good answer, so the user selects
299 it.
300@@ -143,7 +158,7 @@
301 ( ) No existing FAQs are relevant
302 (*) 10: How do I install plugins (Shockwave, QuickTime, etc.)?
303 ( ) 9: How do I troubleshoot problems with extensions/themes?
304- ( ) 7: How do I install Java?
305+ ( ) 8: How do I install Extensions?
306
307 He changes the message and click 'Link to FAQ'.
308
309@@ -226,7 +241,7 @@
310 edits them to be more appropriate:
311
312 >>> print owner_browser.getControl('Title').value
313- Problem showing the SVG demo on W3C site
314+ SVG extension
315 >>> owner_browser.getControl('Title').value = 'Displaying SVG in Firefox'
316
317 >>> print owner_browser.getControl('Content').value
318@@ -308,10 +323,10 @@
319 >>> print extract_text(find_portlet(
320 ... owner_browser.contents, 'Related questions'))
321 Related questions
322- #2 Problem showing the SVG demo on W3C site
323+ #2 SVG extension
324
325 >>> print owner_browser.getLink(
326- ... 'Problem showing the SVG demo on W3C site').url
327+ ... 'SVG extension').url
328 http://answers.launchpad.dev/firefox/+question/2
329
330
331
332=== modified file 'lib/lp/bugs/doc/bugtask-find-similar.txt'
333--- lib/lp/bugs/doc/bugtask-find-similar.txt 2009-06-12 16:36:02 +0000
334+++ lib/lp/bugs/doc/bugtask-find-similar.txt 2010-08-02 02:36:50 +0000
335@@ -55,12 +55,12 @@
336 >>> from canonical.launchpad.interfaces import IDistributionSet
337 >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
338 >>> similar_bugs = getUtility(IBugTaskSet).findSimilar(
339- ... sample_person, "Thunderbird crashes when displaying SVG",
340+ ... sample_person, "Thunderbird SVG",
341 ... distribution=ubuntu)
342 >>> for bugtask in similar_bugs:
343 ... print bugtask.bug.title
344+ Firefox does not support SVG
345 Thunderbird crashes
346- Firefox does not support SVG
347
348 As well as limiting it to a specific source package:
349
350@@ -94,7 +94,7 @@
351 False
352 >>> no_priv = getUtility(ILaunchBag).user
353 >>> similar_bugs = getUtility(IBugTaskSet).findSimilar(
354- ... no_priv, "Thunderbird chrashes when displaying SVG",
355+ ... no_priv, "Thunderbird SVG",
356 ... distribution=ubuntu)
357 >>> for bugtask in similar_bugs:
358 ... print bugtask.bug.title
359@@ -118,13 +118,16 @@
360 results of the fulltext search on the Bug table, so bugs that have a
361 summary or description that match the phrase will be displayed first.
362
363+Due to the sample data assuming a way-to-wide search facility, this test
364+has been narrowed - see bug 612384.
365+
366 >>> similar_bugs = getUtility(IBugTaskSet).findSimilar(
367 ... sample_person, "Another test bug for Thunderbird",
368 ... distribution=ubuntu)
369 >>> for bugtask in similar_bugs:
370 ... print bugtask.bug.title
371 another test bug
372- Thunderbird crashes
373+ >>> #Thunderbird crashes
374
375 >>> similar_bugs = getUtility(IBugTaskSet).findSimilar(
376 ... sample_person, "Another Thunderbird crash",
377@@ -132,4 +135,4 @@
378 >>> for bugtask in similar_bugs:
379 ... print bugtask.bug.title
380 Thunderbird crashes
381- another test bug
382+ >>> #another test bug
383
384=== modified file 'lib/lp/bugs/doc/bugtask.txt'
385--- lib/lp/bugs/doc/bugtask.txt 2010-07-21 19:55:38 +0000
386+++ lib/lp/bugs/doc/bugtask.txt 2010-08-02 02:36:50 +0000
387@@ -1365,7 +1365,6 @@
388 >>> for similar_bug in sorted(similar_bugs, key=attrgetter('id')):
389 ... print "%s: %s" % (similar_bug.id, similar_bug.title)
390 1: Firefox does not support SVG
391- 4: Reflow problems with complex page layouts
392 5: Firefox install instructions should be complete
393
394 This also works for distributions...
395@@ -1375,12 +1374,6 @@
396 >>> for similar_bug in sorted(similar_bugs, key=attrgetter('id')):
397 ... print "%s: %s" % (similar_bug.id, similar_bug.title)
398 1: Firefox does not support SVG
399- 2: Blackhole Trash folder
400- 9: Thunderbird crashes
401- 10: another test bug
402- 16: a test bug
403- 17: a test bug
404- 18: New Bug
405
406
407 ... and for SourcePackages.
408@@ -1394,7 +1387,6 @@
409 >>> for similar_bug in sorted(similar_bugs, key=attrgetter('id')):
410 ... print "%s: %s" % (similar_bug.id, similar_bug.title)
411 1: Firefox does not support SVG
412- 18: New Bug
413
414 Private bugs won't show up in the list of similar bugs unless the user
415 is a direct subscriber. We'll demonstrate this by creating a new bug
416@@ -1406,7 +1398,6 @@
417 >>> for similar_bug in sorted(similar_bugs, key=attrgetter('id')):
418 ... print "%s: %s" % (similar_bug.id, similar_bug.title)
419 1: Firefox does not support SVG
420- 4: Reflow problems with complex page layouts
421 5: Firefox install instructions should be complete
422 ...Yet another Firefox bug
423
424@@ -1420,7 +1411,6 @@
425 >>> for similar_bug in sorted(similar_bugs, key=attrgetter('id')):
426 ... print "%s: %s" % (similar_bug.id, similar_bug.title)
427 1: Firefox does not support SVG
428- 4: Reflow problems with complex page layouts
429 5: Firefox install instructions should be complete
430
431
432
433=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-distro-guided-filebug.txt'
434--- lib/lp/bugs/stories/guided-filebug/xx-distro-guided-filebug.txt 2009-08-18 11:04:38 +0000
435+++ lib/lp/bugs/stories/guided-filebug/xx-distro-guided-filebug.txt 2010-08-02 02:36:50 +0000
436@@ -7,8 +7,12 @@
437
438 Submitting a bug title...
439
440+The example here are a little short - in reality we have a comprehensive
441+database to find candidates from, our sample data has no real near-fits,
442+see bug 612384 for the overall effort to provide a sensible search facility.
443+
444 >>> user_browser.getControl("Summary").value = (
445- ... "Thunderbird crashes when opening large e-mails")
446+ ... "Thunderbird crashes opening")
447 >>> user_browser.getControl("Continue").click()
448
449 ...yields one similar bug.
450
451=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-product-guided-filebug.txt'
452--- lib/lp/bugs/stories/guided-filebug/xx-product-guided-filebug.txt 2009-08-18 11:04:38 +0000
453+++ lib/lp/bugs/stories/guided-filebug/xx-product-guided-filebug.txt 2010-08-02 02:36:50 +0000
454@@ -24,7 +24,7 @@
455 bugs.
456
457 >>> user_browser.getControl("Summary").value = (
458- ... "SVG images aren't displayed")
459+ ... "SVG images are broken")
460 >>> user_browser.getControl("Continue").click()
461
462 The form is self-posting, so the user is still at +filebug. This makes
463@@ -92,7 +92,7 @@
464
465 >>> user_browser.open("http://bugs.launchpad.dev/firefox/+filebug")
466 >>> user_browser.getControl("Summary").value = (
467- ... "SVG images aren't displayed")
468+ ... "SVG images are broken")
469 >>> user_browser.getControl("Continue").click()
470
471 As before, we get a list of similar bugs to choose from.
472@@ -120,7 +120,7 @@
473
474 >>> user_browser.open("http://bugs.launchpad.dev/firefox/+filebug")
475 >>> user_browser.getControl("Summary").value = (
476- ... "SVG images aren't displayed")
477+ ... "SVG images are broken")
478 >>> user_browser.getControl("Continue").click()
479
480 There's a hidden field on the "yes, this is my bug" form, which we can
481
482=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-sorting-by-relevance.txt'
483--- lib/lp/bugs/stories/guided-filebug/xx-sorting-by-relevance.txt 2010-07-22 05:48:07 +0000
484+++ lib/lp/bugs/stories/guided-filebug/xx-sorting-by-relevance.txt 2010-08-02 02:36:50 +0000
485@@ -5,6 +5,11 @@
486 reason, the search result is sorted by how well the given summary
487 matches the bug's summary and description.
488
489+These bugs used to return more hits, but the more restrictive search introduced
490+to bandaid search scaling issues inhibits that in the sample data; when we get
491+a relevance-integrated index we'll be able to do relevance ordered, limited
492+searches efficiently and these tests can be expanded at that point.
493+
494 >>> user_browser.open("http://launchpad.dev/products/firefox/+filebug")
495
496 >>> user_browser.getControl("Summary").value = (
497@@ -16,10 +21,6 @@
498 >>> print_bugs_list(user_browser.contents, "similar-bugs")
499 #1 Firefox does not support SVG
500 New (1 comment) last updated 2006-05-19...
501- Firefox needs to support embedded SVG...
502- #4 Reflow problems with complex page layouts
503- New (0 comments) last updated 2006-07-14...
504- Malone pages that use more complex layouts...
505
506 If we instead enter a summary that matches bug #4 better, the result will
507 be reversed.
508@@ -27,16 +28,10 @@
509 >>> user_browser.open("http://launchpad.dev/products/firefox/+filebug")
510
511 >>> user_browser.getControl("Summary").value = (
512- ... "Reflow problems when there are SVG images on the page")
513+ ... "Reflow problems with SVG")
514 >>> user_browser.getControl("Continue").click()
515
516 >>> print_bugs_list(user_browser.contents, "similar-bugs")
517 #4 Reflow problems with complex page layouts
518 New (0 comments) last updated 2006-07-14...
519 Malone pages that use more complex layouts...
520- #1 Firefox does not support SVG
521- New (1 comment) last updated 2006-05-19...
522- Firefox needs to support embedded SVG...
523- #5 Firefox install instructions should be complete
524- New (0 comments) last updated 2006-07-14...
525- All ways of downloading firefox should provide complete...