lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Rich <ispa...@yahoo.com>
Subject Scorer skipTo() expectations?
Date Thu, 04 Oct 2007 07:12:15 GMT
Hi, 

I have a custom Query class that provides a long list of lucene docIds (not for filtering
purposes), which is one clause in a standard BooleanQuery (which also contains TermQuery instances).

I have a custom Scorer that goes along with the custom Query class. 

What (if any) document ordering requirements does the Scorer class have for its skipTo(int
docId) method?

In particular, currently I'm sorting/returning the docIds in ascending order from my custom
Query class. That can be expensive for large docId lists; is sorting necessary? It looks like
skipTo() might expect the documents it gets to be in ascending order to behave correctly as
part of a BooleanQuery, but I can't tell for sure from the doc.

If the document list from my custom Scorer class does not have its document list in ascending
order (e.g. 10, 80, 40, 60, 50) will whatever uses skipTo() potentially lose hits? If not,
is there any performance concern with having the docIds unordered?


      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on
us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 

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