Re: limit lucene result

2005-09-07 Thread Yonik Seeley
The Hits object retrieves the documents lazily, so just ask it for the first 100. -Yonik On 9/7/05, haipeng du <[EMAIL PROTECTED]> wrote: > > The reason that I want to limit returned result is that I do not want > to get out of memory problem. I index lucene with 3 million documents. > Sometime

limit lucene result

2005-09-07 Thread haipeng du
The reason that I want to limit returned result is that I do not want to get out of memory problem. I index lucene with 3 million documents. Sometimes, searching will return millions of fields back to me. I just want to get the first 100, for example , to show them to user. Even, I use search(query