Exact phrase score


#1

Sorry if this has been beaten to death here but I couldn’t find the
exact answer I was looking for.

In the app I’m writing, we convert the score to a percentage and display
it with the search results. The problem is when you search for an exact
phrase (for example) and it matches the title of a document exactly, you
only get a 17% match.

Has anyone seen a way to either curve the scores or make an exact phrase
match get a higher score?

I’ve looked over the similarity formula so I’m pretty sure I understand
why it happens but I’m just looking for ways to counteract it/make the
score make more sense to the user.

Thanks,
removed_email_address@domain.invalid


#2

Excerpts from EJ Finneran’s message of Mon Jan 22 20:15:08 -0800 2007:

In the app I’m writing, we convert the score to a percentage and
display it with the search results. The problem is when you search
for an exact phrase (for example) and it matches the title of a
document exactly, you only get a 17% match.

Has anyone seen a way to either curve the scores or make an exact
phrase match get a higher score?

How are you converting scores to percentages? I.e. what are you using as
the maximum value?

Are you looking for percentages that are consistent across queries, or
just across results in a single query?


#3

On 31.01.2007, at 22:21, William M. wrote:

In the app I’m writing, we convert the score to a percentage and
display it with the search results.

How are you converting scores to percentages? I.e. what are you
using as
the maximum value?

Ferret::Search::TopDocs#max_score

Example:

index = Ferret::I.new

index << “tic”
index << “tic tac”
index << “tic tac toe”

docs = index.search(“tic OR tac”)

docs.hits.each { |hit| puts hit.score / docs.max_score * 100 }

Result:

100.0
79.999993785928
26.9283741206894

Cheers,
Andy