Pagination ...

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Pagination ...

Dragon Fly-2

Hi,

What is the most efficient way to do pagination in Lucene? I have always done the following because this "flavor" of the search call allows me to specify the top N hits (e.g. 1000) and a Sort object:

    TopFieldDocs topFieldDocs = searcher.search(query, null, 1000, SORT_BY_DATE);

Is it the best way? Thank you.

_________________________________________________________________
Don't get caught with egg on your face. Play Chicktionary!
http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec
Reply | Threaded
Open this post in threaded view
|

RE: Pagination ...

Dragon Fly-2

Any advice on this? Thanks.

> From: [hidden email]
> To: [hidden email]
> Subject: Pagination ...
> Date: Sat, 22 Dec 2007 10:19:30 -0500
>
>
> Hi,
>
> What is the most efficient way to do pagination in Lucene? I have always done the following because this "flavor" of the search call allows me to specify the top N hits (e.g. 1000) and a Sort object:
>
>     TopFieldDocs topFieldDocs = searcher.search(query, null, 1000, SORT_BY_DATE);
>
> Is it the best way? Thank you.
>
> _________________________________________________________________
> Don't get caught with egg on your face. Play Chicktionary!
> http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec

_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007
Reply | Threaded
Open this post in threaded view
|

Re: Pagination ...

Zhou Qi-2
Using the search function for pagination will carry out unnecessary index
search when you are going previous or next. Generally, most of the
information need (e.g 80%) can be satisfied by the first 100 documents
(20%). In lucene, the returing documents is set to 100 for the sake of
speed.

I am not quite sure my way of pagination is best: but it works fine under
test preasure: Just keep the first search result in cache and fetch the
snippet when the document is presented in current page.

2007/12/26, Dragon Fly <[hidden email]>:

>
>
> Any advice on this? Thanks.
>
> > From: [hidden email]
> > To: [hidden email]
> > Subject: Pagination ...
> > Date: Sat, 22 Dec 2007 10:19:30 -0500
> >
> >
> > Hi,
> >
> > What is the most efficient way to do pagination in Lucene? I have always
> done the following because this "flavor" of the search call allows me to
> specify the top N hits ( e.g. 1000) and a Sort object:
> >
> >     TopFieldDocs topFieldDocs = searcher.search(query, null, 1000,
> SORT_BY_DATE);
> >
> > Is it the best way? Thank you.
> >
> > _________________________________________________________________
> > Don't get caught with egg on your face. Play Chicktionary!
> > http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec
>
> _________________________________________________________________
> Get the power of Windows + Web with the new Windows Live.
> http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007
Reply | Threaded
Open this post in threaded view
|

Re: Pagination ...

OneWhoMikes
You might want to take a look at Solr (http://lucene.apache.org/solr/).  You
could either use Solr directly, or see how they implement paging.


--Mike


On Dec 26, 2007 12:12 PM, Zhou Qi <[hidden email]> wrote:

> Using the search function for pagination will carry out unnecessary index
> search when you are going previous or next. Generally, most of the
> information need (e.g 80%) can be satisfied by the first 100 documents
> (20%). In lucene, the returing documents is set to 100 for the sake of
> speed.
>
> I am not quite sure my way of pagination is best: but it works fine under
> test preasure: Just keep the first search result in cache and fetch the
> snippet when the document is presented in current page.
>
> 2007/12/26, Dragon Fly <[hidden email]>:
> >
> >
> > Any advice on this? Thanks.
> >
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: Pagination ...
> > > Date: Sat, 22 Dec 2007 10:19:30 -0500
> > >
> > >
> > > Hi,
> > >
> > > What is the most efficient way to do pagination in Lucene? I have
> always
> > done the following because this "flavor" of the search call allows me to
> > specify the top N hits ( e.g. 1000) and a Sort object:
> > >
> > >     TopFieldDocs topFieldDocs = searcher.search(query, null, 1000,
> > SORT_BY_DATE);
> > >
> > > Is it the best way? Thank you.
> > >
> > > _________________________________________________________________
> > > Don't get caught with egg on your face. Play Chicktionary!
> > > http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec
> >
> > _________________________________________________________________
> > Get the power of Windows + Web with the new Windows Live.
> > http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007
>
Reply | Threaded
Open this post in threaded view
|

RE: Pagination ...

Dragon Fly-2

Thanks.

Date: Wed, 26 Dec 2007 13:07:03 -0500
From: [hidden email]
To: [hidden email]
Subject: Re: Pagination ...
CC: [hidden email]

You might want to take a look at Solr (http://lucene.apache.org/solr/).  You could either use Solr directly, or see how they implement paging.


--Mike



On Dec 26, 2007 12:12 PM, Zhou Qi <[hidden email]> wrote:

Using the search function for pagination will carry out unnecessary index
search when you are going previous or next. Generally, most of the
information need (e.g 80%) can be satisfied by the first 100 documents

(20%). In lucene, the returing documents is set to 100 for the sake of
speed.

I am not quite sure my way of pagination is best: but it works fine under
test preasure: Just keep the first search result in cache and fetch the

snippet when the document is presented in current page.

2007/12/26, Dragon Fly <[hidden email]>:
>
>

> Any advice on this? Thanks.
>
> > From: [hidden email]
> > To: [hidden email]

> > Subject: Pagination ...
> > Date: Sat, 22 Dec 2007 10:19:30 -0500
> >
> >
> > Hi,
> >
> > What is the most efficient way to do pagination in Lucene? I have always

> done the following because this "flavor" of the search call allows me to
> specify the top N hits ( e.g. 1000) and a Sort object:
> >
> >     TopFieldDocs topFieldDocs = searcher.search
(query, null, 1000,
> SORT_BY_DATE);
> >
> > Is it the best way? Thank you.
> >
> > _________________________________________________________________
> > Don't get caught with egg on your face. Play Chicktionary!

> > http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec
>
> _________________________________________________________________

> Get the power of Windows + Web with the new Windows Live.
> http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007




_________________________________________________________________
The best games are on Xbox 360.  Click here for a special offer on an Xbox 360 Console.
http://www.xbox.com/en-US/hardware/wheretobuy/