lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Jiang <ben.ji...@gmail.com>
Subject SpanScorer example with lucene 3.0.0
Date Mon, 28 Dec 2009 06:42:00 GMT
Hi, there,

first of all, thanks for the awesome work!

We have migrated to lucene 3.0. We are very tempted to use SpanQuery, as 
it seems to favor document ranking based on proximity (eg, within a 
document, the distance of the matches is important to the document 
ranking, or even the most important factor). I have tried with Surround 
query parser to create SpanQuery. It did give the right document matches.

My problem is with the highlighter package. If I used the default 
QueryScorer does not give any hits with the query, even though there 
were matching documents.

I did ton of searches and it seemed that the highlighter package should 
have worked with SpanQuery before (2.4.0).

My questions:

    * is QueryScorer the right scorer? Should I use SpanScorer?
    * If SpanScorer is the right class, there is no example about how to
      use SpanScorer. Can someone point an example?

This seems to be quite some changes since 2.9.0. The old SpanScorer from 
highlighter package has been moved to the lucene core. I would 
appreciate if someone can help out here.


Thanks in advance

Ben

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