You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Clandes Tino <cl...@yahoo.co.uk> on 2004/03/08 20:14:41 UTC

Caching and paging search results

Hi all, 
could someone describe his expirience in
implementation of caching, sorting and paging search
results.
Is Stateful Session bean appropriate for this?
My wish is to obtain all search hits only in first
call, and after that, to iterate through Hit
Collection and display cached results.
I have checked SearchBean in contribution section, but
it does not provide real caching and paging.
 
Regards and thanx in advance!
Milan



	
	
		
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Caching and paging search results

Posted by Tatu Saloranta <ta...@hypermall.net>.
On Monday 08 March 2004 12:34, Erik Hatcher wrote:
> In the RealWorld... many applications actually just re-run a search and
> jump to the appropriate page within the hits.... searching is generally
> plenty fast enough to alleviate concerns of caching.
>
> However, if you need to cache Hits, you need to be sure to keep around
> the originating IndexSearcher as well.

Further, oftentimes search index only contains key to actual content indexed 
(which itself is stored as a file, in database, or so)... so it's enough to 
cache just set of such ids, not actual search result objects.
And assuming ids are simple (int id, short String), such information can be 
stored in, say, user session.
In system I'm working on, we store up to 500 hits, only storing document id 
(int) and hit quality (byte), stored in session.

-+ Tatu +-

>
> A stateful session bean could be used, but I'd opt for a much simpler
> solution as a first pass, such as the first point of just re-running a
> search from scratch.
>
> 	Erik
>
> On Mar 8, 2004, at 2:14 PM, Clandes Tino wrote:
> > Hi all,
> > could someone describe his expirience in
> > implementation of caching, sorting and paging search
> > results.
> > Is Stateful Session bean appropriate for this?
> > My wish is to obtain all search hits only in first
> > call, and after that, to iterate through Hit
> > Collection and display cached results.
> > I have checked SearchBean in contribution section, but
> > it does not provide real caching and paging.
> >
> > Regards and thanx in advance!
> > Milan
> >
> >
> >
> >
> >
> >
> > ___________________________________________________________
> > Yahoo! Messenger - Communicate instantly..."Ping"
> > your friends today! Download Messenger Now
> > http://uk.messenger.yahoo.com/download/index.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Caching and paging search results

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
In the RealWorld... many applications actually just re-run a search and 
jump to the appropriate page within the hits.... searching is generally 
plenty fast enough to alleviate concerns of caching.

However, if you need to cache Hits, you need to be sure to keep around 
the originating IndexSearcher as well.

A stateful session bean could be used, but I'd opt for a much simpler 
solution as a first pass, such as the first point of just re-running a 
search from scratch.

	Erik

On Mar 8, 2004, at 2:14 PM, Clandes Tino wrote:

> Hi all,
> could someone describe his expirience in
> implementation of caching, sorting and paging search
> results.
> Is Stateful Session bean appropriate for this?
> My wish is to obtain all search hits only in first
> call, and after that, to iterate through Hit
> Collection and display cached results.
> I have checked SearchBean in contribution section, but
> it does not provide real caching and paging.
>
> Regards and thanx in advance!
> Milan
>
>
>
> 	
> 	
> 		
> ___________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org