Words with apostrophes aren't highlighted in search results


(Wes Osborn) #1

Maybe there has been a regression of this: Apostrophes cause strange search behavior

Over on try:

Searching for the word “test” (test is highlighted):

Searching for the word “test’s” (test’s is NOT highlighted - appears to be searching for “test”?):


(Jeff Atwood) #2

test's is not a valid word. Can you try with a valid word?

I’d expect search to treat human and human's and humans as essentially the same search word.


(Wes Osborn) #5

What’s (what is) is the main problem word in our community.

I wasn’t aware it had to be a real word to be searchable in Discourse. We also have some accepted community shorthand that aren’t real words that we can now see people searching for it in the search logs.


(Brendan Schlagel) #6

What is a “valid word” though? If used as contraction for “[x] is” it’s perfectly grammatical e.g. this test's harder than that test. There could be a book where the narrator’s a dog entitled My Human's the Greatest etc. etc. Sorry to be a pedant :stuck_out_tongue_winking_eye:


(Mittineague) #7

I’m not so sure the issue is about word validity as much as it is the way content is parsed into lexemes.

eg. “words” and “word” have the same lexeme. I imagine possessives and contractions are handled similarly to plurals.


(Kane York) #8

I changed the title of this topic - the topic is, clearly, being found; the word just isn’t being highlighted in the results. Potentially due to title-prettify changing it to a smart quote.


(Wes Osborn) #9

I think it could be impacting the search “weight” as well (the fourth entry in these results we would expect to see first):