: if a query returns 1000 results, the user is interested only in the : results between 500&550. the way I implemented it is run a normal query : using IndexSercher.search(Query()) and then get the specified documents : out of the hits object. I am wondering if there is a more efficient way : than this, is using TopDocs better than the hits object, knowing that : some users may need more than a 1000 docs back in one query?.
generally speaking, yes TopDocs (or TopFieldDocs) are better then Hits if you plan on acessing morethen the first 100 or so results .. Hits will reexecute your search over and over as you ask for higher numbered results, while with TopDocs you search is executed once, and you are given only the Doc IDs of the first N docs you asked for, with no other processing done behind the scenes (in your case, it sounds like N would be 550, and you'd start accessing the ScoreDoc[] at 500. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]