Hi Otis, It depends on the Scorer implementation. The default iterates through matching documents by calling nextDoc(), which just moves along the postings lists in-order, but you could roll your own. You're pretty constrained by the fact that the low-level DocIdSetIterators only move forward though.
I'm experimenting with some out-of-order postings lists (for example, sorted by frequency) to allow early search termination for disjunction queries, but this has its own drawbacks - if postings lists for different terms are in different orders, then you can't use any Scorer that calls advance(). The other thing to look at would be sorted segments, see https://issues.apache.org/jira/browse/LUCENE-4752. Alan Woodward www.flax.co.uk On 4 Apr 2013, at 02:56, Otis Gospodnetic wrote: > Hi, > > When Lucene scores matching documents, what is the order in which > documents are processed/scored and can that be changed? I'm guessing > it scores matches in whichever order they are stored in the index/on > disk, which means by increasing docIDs? > > I do see some out of order scoring is possible.... but can one visit > docs to score in, say, lexicographical order of a specific document > field? > > Thanks, > Otis > -- > Solr & ElasticSearch Support > http://sematext.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org >