43

I just closed https://stackoverflow.com/questions/24016013/whats-the-difference-using-var-f-functiona-and-function-fa as an exact duplicate of var functionName = function() {} vs function functionName() {}. This question was at the top of the Related list, so I was curious why the OP didn't notice it when he was asking the question.

So I tried asking the same question myself. The question I copied showed up at the top of the suggested questions, but the canonical question that everyone links to when closing as a duplicate was not anywhere on the list. In fact, none of the suggested questions seemed to be similar.

14
  • When I copied the post into the new question page, the duplicate is not in the "questions that may already have an answer" list at all. Commented Jun 3, 2014 at 14:14
  • 1
    seems kinda hard to look for duplicates with code in the title, especially when the function names are different f vs functionName
    – Populus
    Commented Jun 3, 2014 at 20:08
  • 17
    @Populus: The Related list found it just fine, so it seems the automatic dupe suggestions should find it too. Commented Jun 3, 2014 at 20:15
  • 2
    Instead of showing the questions ,maybe SO should show the answers.
    – mpm
    Commented Jun 3, 2014 at 20:22
  • 4
    @user2357112 To be fair, I think related gives lots of weight to questions with high votes. There are a handful of questions that are always at the top of questions with certain tags, like JS questions usually have the question about how closures work at the top, but it's only really related infrequently. So this was just one of the cases where the Related guess is right.
    – Barmar
    Commented Jun 3, 2014 at 20:22
  • 1
    I think the problem is that you don't add tags until after writing the question body. If tags were added before or immediately after the title it would be easier to find suggested matches. As far as I know the "related" questions are generated after knowing which tags to match and the suggestions go on title alone.
    – Mog
    Commented Jun 4, 2014 at 2:09
  • 3
    The duplicate detector has no semantic skills. I always search the list when I'm asking a question, but several times I've had duplicates flagged that weren't in the list. And usually most of what is in the list has no connection whatsoever. Just happens to have a few words in. common.
    – WGroleau
    Commented Jun 4, 2014 at 2:13
  • @WesleyMurch When I did my test, I did it in the following order: title, tags, text. At neither stage did the best answer show up. All the suggested questions had only single digit votes, and some were a little negative.
    – Barmar
    Commented Jun 4, 2014 at 4:20
  • 2
    I'm pretty sure only the title affects the suggestions. In my opinion this should be addressed, tags hugely affect the kind of answer you might be looking for.
    – Mog
    Commented Jun 4, 2014 at 4:22
  • @WesleyMurch I recall that tags are used to search for possible dupes, but only if you enter the tags first, and you normally don't cause it's at the bottom.
    – JW Lim
    Commented Jun 4, 2014 at 6:04
  • @JWLim I tried it and nothing happened, but what you say is true: tags are entered last (after the suggestions are shown and probably no longer visible). That's pretty much my point, and perhaps the reason for "Why isn't this obvious duplicate offered when asking the question".
    – Mog
    Commented Jun 4, 2014 at 6:07
  • @WesleyMurch Hm, you seem to be correct. Tags don't seem to have any effect at all. I thought I read somewhere that they did. Yeah, I agree that tags should be used to search for dupes, and they probably should be entered first, too.
    – JW Lim
    Commented Jun 4, 2014 at 6:14
  • Seems to me like the suggestions are usually not even close, for example: i.sstatic.net/9zOyU.png ...and tag-based suggestions would be a big improvement.
    – Mog
    Commented Jun 4, 2014 at 8:32
  • @WesleyMurch Wow, it looks like it was mostly finding titles with "CAN" in them. Apparently spelling it with all caps causes the match to be weighted highly, even though the new question doesn't have it spelled that way.
    – Barmar
    Commented Jun 4, 2014 at 20:17

1 Answer 1

4

For the title What's the difference using 'var f = function(a)' and 'function f(a)'? the Lucene-based textual similarity thingy returns results based on the relatively meaningless terms What's, var and even f.

Bad "more-like-this" results are a fact of life, as I once answered using Stack Overflow as an example.

IMO, it's an honest mistake. When I query Google, my choice of words and phrases may lead to a Stack Overflow post that was marked duplicate. I guess duplicate questions may serve as SEO by increasing the surface area of SO that is reachable from Google.

5
  • 2
    So, the score should be recalibrated. The weight of a word should be inversely proportional to its frequency.
    – Davidmh
    Commented Jun 4, 2014 at 8:13
  • I think that part of the issue here, is that the title consists only of very common words. It's difficult the "similarity thingy" to understand a question like that.
    – Lee White
    Commented Jun 4, 2014 at 8:25
  • @Davidmh: the default Lucene scoring formula already discounts terms by their frequency in the index. Looks like it needs more aggressive stop word filtering.
    – Fred Foo
    Commented Jun 4, 2014 at 11:00
  • @larsmans I admit I am not familiar with the algorithm, but it is clear they should be punished more.
    – Davidmh
    Commented Jun 4, 2014 at 11:03
  • In this case, improving the question title to use more English and less code would be a valid solution. Commented Jun 4, 2014 at 17:43

You must log in to answer this question.

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