Closed Bug 234797 Opened 21 years ago Closed 20 years ago

add a param to query URL for limiting the number of results returned from fulltext search

Categories

(Bugzilla :: Query/Bug List, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: asa, Assigned: myk)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040217

We should add a parameter to the query URL for limiting the number of results
returned from fulltext searching.

Background: I've been using fulltext searching for many months now and have
found that results below the first couple of pages in the buglist are almost
never matches. We currently return the 200 highest relevence bugs and that may
be a reasonable number for most people, but I'd like to be able to manually
adjust that. 

Request: add &limit= parameter to fulltext queries. this parameter should accept
either a relevance value or a bug total. 

I'd like to see us not add UI to the "find a specific bug" page. We don't
necessarily need any UI for this as I'm happy to manually edit my URLs. Another
thought I had related to this would be to further emulate Google and return just
one or two screens full of results with a "more results" link at the bottom of
that list.  

Reproducible: Always
Steps to Reproduce:
Attached patch patch v1: implements feature (obsolete) — Splinter Review
Assignee: justdave → myk
Status: NEW → ASSIGNED
Comment on attachment 143638 [details] [diff] [review]
patch v1: implements feature

I don't want UI either, at least not yet, although I can see us adding it to at
least the advanced search form at some stage.  In the meantime, here's a small
patch that implements the feature and can be used by those who know it's there
on both the "find a specific bug" and advanced search forms.
Attachment #143638 - Flags: review?(justdave)
Comment on attachment 143638 [details] [diff] [review]
patch v1: implements feature

>Index: buglist.cgi
>+if ($::FORM{'limit'} && detaint_natural($::FORM{'limit'})) {
>+    $query .= " LIMIT $::FORM{'limit'}";

Please don't add any references to %::FORM :)  We're trying to kill that off
right now and you're making more work :)

Use $cgi->param.

Other than that, this looks good though.
Attachment #143638 - Flags: review?(justdave) → review-
Comment on attachment 143638 [details] [diff] [review]
patch v1: implements feature

ok, I changed my mind... they haven't converted this file yet, they can fix the
%::FORM references when they do.
Attachment #143638 - Flags: review- → review+
Flags: approval+
Target Milestone: --- → Bugzilla 2.18
The first patch conflicts with the fix for bug 237176, which I just checked in.
 Here's the trivial update that resolves the conflict.
Attachment #143638 - Attachment is obsolete: true
Comment on attachment 145519 [details] [diff] [review]
patch v2: resolves conflict

Dave,

The patch you reviewed conflicts with the fix for bug 237176, which I just
checked in.  Here's the trivial update that resolves the conflict.  It's short
and simple; can I get a quick r= from you?
Attachment #145519 - Flags: review?(justdave)
Comment on attachment 145519 [details] [diff] [review]
patch v2: resolves conflict

yeah, looks good.
Attachment #145519 - Flags: review?(justdave) → review+
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.252; previous revision: 1.251
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: