Closed
Bug 483812
Opened 16 years ago
Closed 16 years ago
Search terms should appear bolded in search results
Categories
(support.mozilla.org :: General, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
1.0.2
People
(Reporter: stephend, Assigned: paulc)
References
()
Details
(Whiteboard: sumo_only)
Attachments
(2 files)
Steps to Reproduce:
1. Load http://support-stage.mozilla.org/tiki-newsearch.php?where=d&locale=en-US&q=bookmark&sa=
2. Look for "bookmark" in the search results
Expected Results:
"bookmark" should appear bolded
Comment 1•16 years ago
|
||
One of those search switch bugs that would be really really nice to have. Eric? :)
Assignee: nobody → smirkingsisyphus
Priority: -- → P1
Target Milestone: --- → 1.1
Comment 2•16 years ago
|
||
How fancy are we getting here?
Exact matches only? Plurals?...transitive verbs...gerunds?
Comment 3•16 years ago
|
||
Err...I meant verb tenses when I said transitive verbs.
...sigh.
Comment 4•16 years ago
|
||
Ideally like Google is doing it, which is to highlight the individual words: http://www.google.se/search?q=firefox+support+help&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:sv-SE:official&client=firefox-a
This is how our current search engine does it on SUMO prod, too.
Comment 5•16 years ago
|
||
The current SUMO uses google, doesn't it?
At the very least, it will bold the individual terms. If including plurals, gerunds, and verb tenses doesn't make things buggy, I'll include that too.
Updated•16 years ago
|
Target Milestone: 1.1 → 1.0
Updated•16 years ago
|
Assignee: smirkingsisyphus → paul.craciunoiu
Assignee | ||
Comment 6•16 years ago
|
||
Works for individual words.
r23761 / r23762
Other things, like plurals, gerunds, and so on are language-based and so ... I could maybe give it a try for English only. Either way, it'll be a hassle unless there's some large database out there that we can use.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 7•16 years ago
|
||
Yeah that sounds challenging to say the least. Wasn't sure what Eric meant when he said he could include that too. I have no idea how to bend e.g. a Japanese noun. :)
Comment 8•16 years ago
|
||
As I told Paul, I was just going to "wing it."
Assignee | ||
Comment 9•16 years ago
|
||
Just so we're clear, this bolds all parts of words that match the search.
For example, on:
https://support-stage.mozilla.org/tiki-newsearch.php?locale=en&q=it+feed&where=all&sa=&filter_lang=1&l=en&en_too=1&lastmodif=0&type=0&author=
Both "it" and the "it" part of "item" are bolded in the 2nd result. I could potentially add an exception for languages that have words separated by spaces (or punctuation). I think japanese is not one of them, for example.
So, yeah, let me know how far we need to go and I can try to see :)
Comment 10•16 years ago
|
||
Search phrase highlighting is not case-sensitive.Reopening..
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 11•16 years ago
|
||
Assignee | ||
Comment 12•16 years ago
|
||
We need a better replace function. Anyone got more experience with preg_match?
Needs to replace case-sensitive with case-sensitive.
I need help! :)
Comment 13•16 years ago
|
||
Correction:Oops..my comments, 11 and 12-should say case insensitive.
Updated•16 years ago
|
Target Milestone: 1.0 → 1.0.2
Assignee | ||
Comment 14•16 years ago
|
||
Updated. Now the search terms are bolded in title and summary as entire words. A word is considered anything that's not followed or preceded by punctuation or spaces.
This will need some good amount of testing once newsearch works again (seems that currently it doesn't on staging).
r24213 / r24215
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 15•16 years ago
|
||
Verified FIXED on https://support-stage.mozilla.org/tiki-newsearch.php?where=d&locale=en-US&q=bookmark&sa=; we'll need to keep testing, as you say, to look for regression and/or other lurking bugs.
Status: RESOLVED → VERIFIED
Comment 16•16 years ago
|
||
Empty queries bold entire summaries.
https://support-stage.mozilla.org/tiki-newsearch.php?locale=&q=&where=all&sa=&filter_lang=1&l=ar&en_too=1&lastmodif=0&type=0&author=
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 17•16 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 18•16 years ago
|
||
Verified FIXED;
Search for bookmarks: https://support-stage.mozilla.org/tiki-newsearch.php?locale=en&q=bookmarks&where=all&sa=&filter_lang=1&l=en&en_too=1&lastmodif=0&type=0&author=
Empty search: https://support-stage.mozilla.org/tiki-newsearch.php?locale=&q=&where=all&sa=&filter_lang=1&l=ar&en_too=1&lastmodif=0&type=0&author
Status: RESOLVED → VERIFIED
Comment 19•16 years ago
|
||
Just as a heads up...
When/if the patch from bug 489277 lands, this will be broken for languages with multibyte encodings, like Japanese.
Maybe we could move to something simpler (at line 635), like $preg_repl = "/(\b" . preg_quote($enc_q)."\b)/Ui";
Assignee | ||
Comment 20•16 years ago
|
||
(In reply to comment #19)
> Maybe we could move to something simpler (at line 635), like $preg_repl =
> "/(\b" . preg_quote($enc_q)."\b)/Ui";
The idea of that was to bold the entire word, and yes, I must've missed the \b option. It's definitely better. I should wait for that patch to land first :)
Thanks again Eric!
Assignee | ||
Comment 21•16 years ago
|
||
Committed Eric's solution to fix bug 489372.
Reporter | ||
Updated•16 years ago
|
Keywords: push-needed
Reporter | ||
Updated•16 years ago
|
Keywords: push-needed
Updated•15 years ago
|
Whiteboard: sumo_only
You need to log in
before you can comment on or make changes to this bug.
Description
•