Closed
Bug 503442
Opened 15 years ago
Closed 15 years ago
Forum items before KB items in search results for English searches
Categories
(support.mozilla.org :: General, defect)
support.mozilla.org
General
Tracking
(Not tracked)
VERIFIED
FIXED
1.2.1
People
(Reporter: cilias, Assigned: paulc)
References
()
Details
(Whiteboard: sumo_only)
Attachments
(1 file)
834 bytes,
patch
|
laura
:
review+
|
Details | Diff | Splinter Review |
Search for "enable cookies". <https://support.mozilla.com/tiki-newsearch.php?where=all&locale=en-US&q=enable+cookies&sa=> First result is <https://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=262807&forumId=1>, which is a forum link. Second result is <https://support.mozilla.com/en/kb/Cannot+log+in+to+websites>, which is a KB article. Any KB results should be listed before forum results.
Assignee | ||
Comment 1•15 years ago
|
||
I think this can be done with sphinx weight adjustments, but let's wait for the indexer to be fixed first.
Assignee: nobody → paul.craciunoiu
Depends on: 485329
Assignee | ||
Comment 2•15 years ago
|
||
The code in tiki-newsearch.php is very hard to understand. At first, I tried doing this with weights, but they don't seem to be working on stage. I will file a patch with an easier fix (and probably what the fixed code actually intended). I think we should do a full rewrite of tiki-newsearch.php, or we will have serious problems whenever we need to change something in the future. Several things are hard coded (array values) which will not work for p10n (see lines 55, 112, 143, 213 for hard coded arrays, for example). There's a lot of duplicated code and unreachable code (the patch I will file fixes some of this).
Target Milestone: --- → 1.2.1
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #389063 -
Flags: review?(laura)
Comment 4•15 years ago
|
||
(In reply to comment #2) > The code in tiki-newsearch.php is very hard to understand. At first, I tried > doing this with weights, but they don't seem to be working on stage. > > I will file a patch with an easier fix (and probably what the fixed code > actually intended). I think we should do a full rewrite of tiki-newsearch.php, > or we will have serious problems whenever we need to change something in the > future. Several things are hard coded (array values) which will not work for > p10n (see lines 55, 112, 143, 213 for hard coded arrays, for example). There's > a lot of duplicated code and unreachable code (the patch I will file fixes some > of this). Can you file a specific bug for p10n that covers these issues? Thanks!
Updated•15 years ago
|
Attachment #389063 -
Flags: review?(laura) → review+
Comment 5•15 years ago
|
||
Comment on attachment 389063 [details] [diff] [review] patch, v1 This seems to work but it makes my head hurt. A lot. Extra QA please!
Assignee | ||
Comment 6•15 years ago
|
||
I will roll out a patch soon that rewrites tiki-newsearch.php to make it look... more logical. At least it will be a first step to have the code make more sense. This will come out with bug 501880. And now that I rewrote that code, I actually realize this patch will only work for English searches. When searching with where=all in other locales, KB + Forum articles in English will be mixed up, but KB articles in that locale will stay first (at least!). To make forum posts show up last for other locale searches, we need to rewrite the function get_bests_3() -- would anyone hate me if we do that as part of the rewrite (for bug 501880) instead of here? r30155 / r30156
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: Forum items before KB items in search results → Forum items before KB items in search results for English searches
Comment 7•15 years ago
|
||
Verified FIXED; I see 6 KB articles before the forum results, on http://support-stage.mozilla.org/tiki-newsearch.php?where=all&locale=en-US&style_mode=inproduct&q=enable+cookies&sa=.
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Whiteboard: sumo_only
You need to log in
before you can comment on or make changes to this bug.
Description
•