11

When I search for posts, I've noticed odd behavior with respect to highlighting of matching text in the search results.

Is this a bug? Will it be fixed?

Markup of the results is very useful, drawing the user's eye to relevant portions of the results that are visible. However, the markup done on Stack Overflow does not meet expectations, see:

  • A search [tag] is not treated as text in searches, so should not be treated as such in the display of search results.
  • There is no value to mark any text in the tag wiki displayed when searching for a single tag. (So no need to increase the tag's visibility with bold + highlight.)
  • All single words searched for should be marked. This marking could be limited to the portion of the questions searched (title: vs body:), but doing both is acceptable.
  • All exact phrases (e.g. "exact phrase") should be marked. Separate words making up the phrase should not.
  • Markings should stand out in both question titles and body snippets, to make them stand out to the user.

This isn't quite what we see today on Stack Overflow:

  • Example 1, a search on a single tag for a single word. The tag gets bold+highlight treatment in the tag wiki while the searched word is not marked, neither is marked in question titles, and both appear bold inside the text snippets in the search results.

    Odd thing - does not get marked, while does... presumably there is some logic deciding c++ isn't a word because of the punctuation?

    search on a single tag for a single word

  • Example 2, a search on the same single tag for an exact multi-word phrase. As before, but non-exact matches of the search phrase get marked in question snippets.

    search on single tag for exact multi-word phrase

6
  • 21
    Those circles don't look freehand. Neither do the arrows for that matter. What are you trying to pull here?
    – user4639281
    Commented Jan 8, 2018 at 20:06
  • 1
    I believe some of this can be explained by the title just not getting any search highlighting. But that still leaves the javadoc thing, and the exact phrase leading to individual words being highlighted.
    – Erik A
    Commented Jan 8, 2018 at 21:34
  • 2
    I've never seen a website this worked on reliably before
    – LW001
    Commented Jan 9, 2018 at 15:35
  • 1
    @LW001 Not even on Google?
    – Filnor
    Commented Jan 9, 2018 at 15:52
  • 2
    I can't help but find humor in the fact that my witty comment has more than double the score of this question.
    – user4639281
    Commented Jan 11, 2018 at 21:33
  • 1
    @TinyGiant ...another reason I should hate you. ;)
    – Mogsdad
    Commented Jan 12, 2018 at 1:18

0

You must log in to answer this question.

Browse other questions tagged .