Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Given that the /similar method can be sorted by relevance there must be a numeric rank for each question. Would it be possible to have access to the value? Off by default, but can be enabled by using a filter?

share|improve this question
    
Why do you need access to the value? How would it benefit an app / library? –  Nathan Osman Jan 28 '12 at 19:39
    
I was thinking it would be possible to use this value to determine if another site could be more suited to a question? –  Jonathan. Jan 28 '12 at 20:56
    
Relevance doesn't indicate the question's relevance to the site but rather its relevance to the search terms. –  Nathan Osman Jan 28 '12 at 21:01
    
I know but if you query multiple sites, you can compare average (or something like average) relevance. –  Jonathan. Jan 28 '12 at 21:15
add comment

1 Answer 1

There actually isn't much sensible that we could return as a "relevance rank", what we essentially get out of Lucene is just the order of posts to return.

Internally, relevance ordering doesn't make sense to compare across separate invocations of the same query much less across different queries or even sites.

Our search infrastructure is also subject to essentially constant tweaks, so we couldn't even guarantee the semblance of stability in such "relevance ranks".

So, I'm -ing this as implementing it would be more or less the same as returning rand() for each post in the result.

share|improve this answer
    
So what is the list sorted on? can't you just make that visible? –  Jonathan. Jan 29 '12 at 23:04
    
@Jonathan. - there is a number, yes. It's hidden deep inside Lucene.NET, so it's not readily available even in our own code. While we could pull it out, it'd be worthless, as it's not stable or meaningfully comparable outside of the original query and query time. –  Kevin Montrose Jan 30 '12 at 0:10
add comment

You must log in to answer this question.

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