lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Krämer <martin.kraemer.bec...@gmail.com>
Subject Lucene 5.4 - scoring divided by number of search terms?
Date Sun, 13 Mar 2016 20:03:59 GMT
I have a simple setup with IndexSearcher, QueryParser, SimpleAnalyzer.
Running some queries I recognised that a query with more than one term
returns a different ScoreDoc[i].score than shown in explain query
statement. Apparently it is the score shown in explain divided by the
number of search terms. any explanation for this behaviour?

Running search(TERM1 TERM2 TERM3)
line:term1 line:term2 line:term3
2.167882 = sum of:
  0.6812867 = weight(line:term1 in 6594) [DefaultSimilarity], result of:
    0.6812867 = score(doc=6594,freq=2.0), product of:
      0.5389907 = queryWeigh

totalHits 1
1678413725, TERM1 TERM2 TERM3, score: 0.72262734

I understand the coord() statement would be used to penalise documents
which include only a subset of the search terms provided. However this
document includes all terms. Any suggestions?
------------------------------

More details

These two scores are result of the same query. Only the second query gets
divided

0.114700586 = product of:
  0.34410176 = sum of:
    0.34410176 = weight(line:term1 in 24) [DefaultSimilarity], result of:
      0.34410176 = score(doc=24,freq=1.0), product of:
        0.5389907 = queryWeight, product of:
          8.17176 = idf(docFreq=14, maxDocs=19532)
          0.065957725 = queryNorm
        0.63841873 = fieldWeight in 24, product of:
          1.0 = tf(freq=1.0), with freq of:
            1.0 = termFreq=1.0
          8.17176 = idf(docFreq=14, maxDocs=19532)
          0.078125 = fieldNorm(doc=24)
  0.33333334 = coord(1/3)

item_id: 1495958818, item_name: term 1 dolor sit met, score: 0.114700586


0.18352094 = product of:
  0.5505628 = sum of:
    0.5505628 = weight(line:term 1 in 6112) [DefaultSimilarity], result of:
      0.5505628 = score(doc=6112,freq=1.0), product of:
        0.5389907 = queryWeight, product of:
          8.17176 = idf(docFreq=14, maxDocs=19532)
          0.065957725 = queryNorm
        1.02147 = fieldWeight in 6112, product of:
          1.0 = tf(freq=1.0), with freq of:
            1.0 = termFreq=1.0
          8.17176 = idf(docFreq=14, maxDocs=19532)
          0.125 = fieldNorm(doc=6112)
  0.33333334 = coord(1/3)

item_id: 1677761523, item_name: some text term 1, score: 0.061173648


-- 
Test Signature

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message