mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.19k stars 508 forks source link

about if you search <a> in https://developer.mozilla.org #3004

Closed ghost closed 3 years ago

ghost commented 3 years ago

Summary What is the problem? when you search in search bar, it tell you that:"0 documents found for "a" in en-US."

Steps To Reproduce (STR) How can we reproduce the problem?

  1. go to https://developer.mozilla.org
  2. there's a search bar that on the right top, say:"search MDN"
  3. write a or

Actual behavior What actually happened? there no document found, but if you search: (a HTML) in google, you may found a page :"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a"

Expected behavior What did you expect to happen? when i search a, or , it will come out the page of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Additional context Is there anything else we should know? i also try it on my iphone , but it also can't found anything.

AprilMorone commented 3 years ago

I reproduced this issue and found that it indeed can be found, but not by simply typying 'a' (without quotes) in the "Search MDN" search bar. But not by also typing simply '' nor ':' . You need to to type exactly the following for the search to show in its results, the ": The Anchor element" page (without quotes, of course.

On Sun, Feb 21, 2021, 2:56 PM usecry notifications@github.com wrote:

Summary What is the problem? when you search in search bar, it tell you that:"0 documents found for "a" in en-US."

Steps To Reproduce (STR) How can we reproduce the problem?

  1. go to https://developer.mozilla.org
  2. there's a search bar that on the right top, say:"search MDN"
  3. write a or

Actual behavior What actually happened? there no document found, but if you search: (a HTML) in google, you may found a page :"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a "

Expected behavior What did you expect to happen? when i search a, or , it will come out the page of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Additional context Is there anything else we should know? i also try it on my iphone , but it also can't found anything.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mdn/kuma/issues/7797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN76ZH434S2HFTAAXWG4DLTAFQN3ANCNFSM4X7J24IQ .

AprilMorone commented 3 years ago

By the way, the word "Element" of the title that shows of the : The Anchor element page doesn't have a capital letter to start it. That seems to throw it off, a bit, possibly. I'd like to fix these issues, but as of kate, I don't have time after I healed from knee surgery, I'm back in college classes, plus college side coding projects that will benefit my college.

On Sun, Feb 21, 2021, 2:56 PM usecry notifications@github.com wrote:

Summary What is the problem? when you search in search bar, it tell you that:"0 documents found for "a" in en-US."

Steps To Reproduce (STR) How can we reproduce the problem?

  1. go to https://developer.mozilla.org
  2. there's a search bar that on the right top, say:"search MDN"
  3. write a or

Actual behavior What actually happened? there no document found, but if you search: (a HTML) in google, you may found a page :"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a "

Expected behavior What did you expect to happen? when i search a, or , it will come out the page of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Additional context Is there anything else we should know? i also try it on my iphone , but it also can't found anything.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mdn/kuma/issues/7797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN76ZH434S2HFTAAXWG4DLTAFQN3ANCNFSM4X7J24IQ .

ghost commented 3 years ago

thank for leave long comment, at lease to me that i have to take long time to writing.(any stuff) your comment are very helpful , show out that it not my computer's fault cause this problem emm hope you will back to normal soon

AprilMorone commented 3 years ago

I smiled at your comment. Thank you. I soon will be. Glad to help. Nope, it's not your computer.

On Sun, Feb 21, 2021, 3:40 PM usecry notifications@github.com wrote:

thank for leave long comment, at lease to me that i have to take long time to writing.(any stuff) your comment are very helpful , show out that it not my computer's fault cause this problem emm hope you will back to normal soon

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mdn/kuma/issues/7797#issuecomment-782922679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN76ZHGMV66CONXEBSZ5ODTAFVVHANCNFSM4X7J24IQ .

peterbe commented 3 years ago

The indexing is actually happening in the Deployer which is a piece of code that's part of Yari's build process.

The reason <a> yields nothing is because when broken down into tokens it first becomes a and that's a stop word so all you're left with is '' (no tokens).

It's a bit better with <video> but if someone typed that it will also match Multimedia: video which might be a bit surprising.

However, imagine two different users. They both want to get to this page: <script>: The Script element One might type: script The other might type: <script> In that case I think it makes sense to break down the indexing to 2 different tokens. Just to cover all the cases.