46

I tried to ask the following question:

A question tagged with JavaScript

The question is tagged with . And I get various candidates, which "may" already have the answer. But none of the candidates even match the programming language. The six top suggestions are obviously completely irrelevant.

I would call it a bug, if the tags are not correctly compared.

16
  • What if a question is tagged with 2 languages (font / back-end)? What language should be used for the comparison?
    – Cerbrus
    Commented Dec 7, 2017 at 11:44
  • 12
    @Cerbrus: Both, I would guess. Bringing in results from completely unrelated languages doesn't seem helpful.
    – user000001
    Commented Dec 7, 2017 at 11:55
  • 1
    @user000001: Assuming the issue is in both tags. So, now it can only suggest questions that have the exact same tags. That's rather counter-productive.
    – Cerbrus
    Commented Dec 7, 2017 at 11:56
  • 2
    @Cerbrus: I meant results in any of the two languages. Not to have the exact combination of tags.
    – user000001
    Commented Dec 7, 2017 at 11:58
  • 31
    It is just not very sophisticated, also obvious from the Related list to the right of a question. One design choice that does not help much is that the tags are at the bottom, so entered last. Afaik the machine only looks at the Title. There are many, many possible wins from improving this page. It has been talked about for the past 4 years but nothing was done. I suspect there is nobody around anymore that still knows the code or dares touch it after umpteen perf tweaks. Commented Dec 7, 2017 at 11:58
  • I too thought the suggestions only come from the title.. Ceving, if you think SO's NLP is crap and should be improved, why not get a job with them to do it?
    – Caius Jard
    Commented Dec 7, 2017 at 12:30
  • 2
    @CaiusJard They have no office here.
    – ceving
    Commented Dec 7, 2017 at 12:58
  • 6
    The answer to the question in question is "No". Not unless you're comparing references to the same object. to different node objects can reference the same node while being different objects, this would evaluate to false. If you want to compare nodes, use Node#isSameNode()
    – user4639281
    Commented Dec 7, 2017 at 19:21
  • 29
    Did you just answer an SO question in a meta comment ? How unusual... and funny... i guess. Commented Dec 7, 2017 at 21:21
  • meh... most of the time when I type out a question the suggestions are related. If you change your prompt to can you instead of is it safe it seems to give more relevant suggestions, so maybe it's just putting too much weight on specific words or the start of the sentence. If none of the suggestions are relevant that just means your question is a good one to post, right? Commented Dec 7, 2017 at 22:06
  • 3
    Tangential, but the 'related' questions seem heavily biased towards votes, regardless of actual relation. If I had a dollar for every time I saw the "why does loop run faster on sorted array" question...
    – mbrig
    Commented Dec 7, 2017 at 23:04
  • 1
    Just to confirm what commenters have speculated, it seems that it only analyses the title
    – Tas
    Commented Dec 7, 2017 at 23:06
  • 5
    Duplicate on Meta SE - Let the duplicate questions finder consider tags Commented Dec 8, 2017 at 10:58
  • 2
    @CaiusJard If the answer to every bug in a program was to get a job with that company and fix it yourself you'd be forever changing jobs. Commented Dec 8, 2017 at 11:07
  • 1
    @Tas No, it also analyzes the body of the questions it suggests. I just posted an answer to the question you linked to explaining that that's the case and how I found that out. Commented Dec 9, 2017 at 11:51

1 Answer 1

8

We've made some changes to how the search works here due to performance reasons...but it turns out they greatly increased relevancy as well, specifically due to quoted strings being inadvertently excluded before. There are other reasons it's better (and faster) due to the filter and boosting changes, but the moral of the story is: results are more relevant now (at least on average) and we saw a drastic uptick in usage after the change. Which, given we did this for performance, was a very nice surprise. Here's what the same title returns today:

title search

3
  • Does that mean tags are considered? I see an Obj-C question at the bottom, surely that shouldn't come up when you search for a javascript Q&A?
    – jpp
    Commented Jan 5, 2019 at 14:30
  • 2
    They are considered and weighted, but they are not required to match. There are a lot of similar tags or people forgetting to tag a thing, and when entering a title there may be (and often are) no tags yet. When reasoning about a tag match - if we required them to match, we'd be removing the relevant results most of the time. So it's just a strong suggestion that they match.
    – Nick Craver Mod
    Commented Jan 5, 2019 at 14:32
  • 1
    Was this changed again in the Duplicate questions display experiment? The top voted answer in that thread asks to use tags for this purpose.
    – Martin
    Commented Jul 15, 2019 at 3:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .