well,
i have somthing like that:
int hitsPerPage = 10;
IndexSearcher searcher = new IndexSearcher(this.indexPath);
TopDocCollector collector = new TopDocCollector(hitsPerPage);
Query query = new QueryParser("",
this.analizer).parse(DocumentRepositoryEntry.Fields.ID.toString() + ":"
+ id);
searcher.search(query, collector);
ScoreDoc[] hits = collector.topDocs().scoreDocs;
i know that the colector have all docs in the query, how do i navigate
between the next pages?
thanks,
Galaio
On Fri, Jun 19, 2009 at 12:57 PM, João Silva <[email protected]> wrote:
> Thanks Uwe, I will see that.
>
> Galaio
>
>
>
>
> On Fri, Jun 19, 2009 at 12:36 PM, Uwe Schindler <[email protected]> wrote:
>
>> Hallo,
>>
>> Just retrieve the TopDocs for the first n documents, where n =
>> offset+count,
>> where offset is the first hit on the page (0-based) and count the number
>> per
>> page.
>> To display the results you would then just start at offset in TopDocs and
>> retrieve the stored field from there to offset+count.
>>
>> Uwe
>>
>> -----
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: [email protected]
>>
>>
>> > -----Original Message-----
>> > From: João Silva [mailto:[email protected]]
>> > Sent: Friday, June 19, 2009 12:58 PM
>> > To: [email protected]
>> > Subject: Collector Pagination
>> >
>> > Hi,
>> > is there any api form of Hits pagination?
>> > for example, if i want to retreve the hits between
>> > an interval.
>> >
>> > --
>> > Cumprimentos,
>> > João Carlos Galaio da Silva
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> Cumprimentos,
> João Carlos Galaio da Silva
>
--
Cumprimentos,
João Carlos Galaio da Silva