lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Sevi <>
Subject score from spans
Date Sun, 02 Aug 2009 15:30:10 GMT

How can I get the score of a span that is the result of SpanQuery.getSpans()
? The score should can be the same for each document, but if it's unique per
span, it's even better.

I tried looking for a way to expose this functionality through the Spans
class but it looks too complicated.
I'm not even sure that by default some score calculation is even performed
when using span queries.

I've noticed that some calculations are made using payloads and
BoostingTermQuery but the score result is used internally and can't be
accessed from the Spans results.
I don't want to re-run the query again using a HitCollector and since the
reader is passed to getSpans, I think it should be possible to do what I

Any help on the correct way to expose the span score will be appreciated.


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