If Stackoverflow wants to build this library, let mods and enthusiasts decide whether a question is worth indexing, and let the questions that would otherwise be closed as duplicate or off-topic be as they are. Perhaps replace "duplicate" with "related to indexed question #XXXXXX"?
It would certainly take a while to restructure SO like this, but with enough effort and time, lower-quality questions simply won't show up in searches unless there really isn't a better related question available.