Lucene scoring seems to completely elude my understanding.
I have a set of documents for the following:
Senior Education Recruitment Consultant
Senior IT Recruitment Consultant
Senior Recruitment Consultant
These have been analysed using EnglishAnalyzer
.
The search query is built with a QueryParser
using EnglishAnalyzer
as well.
When I search for Senior Recruitment Consultant
every one of the above documents are returned with the same score, where the desired (and expected) result would be Senior Recruitment Consultant
as the top result.
Is there a straightforward way of achieving the desired behaviour that I've missed?
Here is my debugging output:
4.6491017 = (MATCH) sum of:
1.1064172 = (MATCH) weight(Title:senior in 22157) [DefaultSimilarity], result of:
1.1064172 = score(doc=22157,freq=1.0 = termFreq=1.0
), product of:
0.4878372 = queryWeight, product of:
4.53601 = idf(docFreq=818, maxDocs=28116)
0.10754765 = queryNorm
2.268005 = fieldWeight in 22157, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
4.53601 = idf(docFreq=818, maxDocs=28116)
0.5 = fieldNorm(doc=22157)
2.3421772 = (MATCH) weight(Title:recruit in 22157) [DefaultSimilarity], result of:
2.3421772 = score(doc=22157,freq=1.0 = termFreq=1.0
), product of:
0.70978254 = queryWeight, product of:
6.5997033 = idf(docFreq=103, maxDocs=28116)
0.10754765 = queryNorm
3.2998517 = fieldWeight in 22157, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
6.5997033 = idf(docFreq=103, maxDocs=28116)
0.5 = fieldNorm(doc=22157)
1.2005073 = (MATCH) weight(Title:consult in 22157) [DefaultSimilarity], result of:
1.2005073 = score(doc=22157,freq=1.0 = termFreq=1.0
), product of:
0.50815696 = queryWeight, product of:
4.724947 = idf(docFreq=677, maxDocs=28116)
0.10754765 = queryNorm
2.3624735 = fieldWeight in 22157, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
4.724947 = idf(docFreq=677, maxDocs=28116)
0.5 = fieldNorm(doc=22157)
4.6491017 = (MATCH) sum of:
1.1064172 = (MATCH) weight(Title:senior in 22292) [DefaultSimilarity], result of:
1.1064172 = score(doc=22292,freq=1.0 = termFreq=1.0
), product of:
0.4878372 = queryWeight, product of:
4.53601 = idf(docFreq=818, maxDocs=28116)
0.10754765 = queryNorm
2.268005 = fieldWeight in 22292, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
4.53601 = idf(docFreq=818, maxDocs=28116)
0.5 = fieldNorm(doc=22292)
2.3421772 = (MATCH) weight(Title:recruit in 22292) [DefaultSimilarity], result of:
2.3421772 = score(doc=22292,freq=1.0 = termFreq=1.0
), product of:
0.70978254 = queryWeight, product of:
6.5997033 = idf(docFreq=103, maxDocs=28116)
0.10754765 = queryNorm
3.2998517 = fieldWeight in 22292, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
6.5997033 = idf(docFreq=103, maxDocs=28116)
0.5 = fieldNorm(doc=22292)
1.2005073 = (MATCH) weight(Title:consult in 22292) [DefaultSimilarity], result of:
1.2005073 = score(doc=22292,freq=1.0 = termFreq=1.0
), product of:
0.50815696 = queryWeight, product of:
4.724947 = idf(docFreq=677, maxDocs=28116)
0.10754765 = queryNorm
2.3624735 = fieldWeight in 22292, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
4.724947 = idf(docFreq=677, maxDocs=28116)
0.5 = fieldNorm(doc=22292)
4.6491017 = (MATCH) sum of:
1.1064172 = (MATCH) weight(Title:senior in 22494) [DefaultSimilarity], result of:
1.1064172 = score(doc=22494,freq=1.0 = termFreq=1.0
), product of:
0.4878372 = queryWeight, product of:
4.53601 = idf(docFreq=818, maxDocs=28116)
0.10754765 = queryNorm
2.268005 = fieldWeight in 22494, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
4.53601 = idf(docFreq=818, maxDocs=28116)
0.5 = fieldNorm(doc=22494)
2.3421772 = (MATCH) weight(Title:recruit in 22494) [DefaultSimilarity], result of:
2.3421772 = score(doc=22494,freq=1.0 = termFreq=1.0
), product of:
0.70978254 = queryWeight, product of:
6.5997033 = idf(docFreq=103, maxDocs=28116)
0.10754765 = queryNorm
3.2998517 = fieldWeight in 22494, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
6.5997033 = idf(docFreq=103, maxDocs=28116)
0.5 = fieldNorm(doc=22494)
1.2005073 = (MATCH) weight(Title:consult in 22494) [DefaultSimilarity], result of:
1.2005073 = score(doc=22494,freq=1.0 = termFreq=1.0
), product of:
0.50815696 = queryWeight, product of:
4.724947 = idf(docFreq=677, maxDocs=28116)
0.10754765 = queryNorm
2.3624735 = fieldWeight in 22494, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
4.724947 = idf(docFreq=677, maxDocs=28116)
0.5 = fieldNorm(doc=22494)
Senior Education Recruitment Consultant 4.6491017
Senior IT Recruitment Consultant 4.6491017
Senior Recruitment Consultant 4.6491017