lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herb Roitblat <>
Subject Picking single results out of a list of results
Date Sat, 15 Oct 2011 18:47:24 GMT
I have an application where I would like to pick one document from 
somewhere in the list of search results.  For example, I would like to 
retrieve one of the results at rank 57, another at rank 1223, etc.  I'm 
not real clear on how to do it.

I have seen some things on simulating pagination with Lucene, some code 
on using hitlists and some comments on hitlists being deprecated.

I have seen the class TopDocsCollector and the method
int howMany)|
           Returns the documents in the rage [start ..

I can see using topDocs with howMany = 1, but I'm wondering whether that 
means that the system iterates over the entire return list until it 
finds the the one at rank start?

Is this the best way to do it?

I'm using pyLucene 2.9 on Ubuntu 10.04.

Thanks for any pointers.

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