Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Proximity for Swish-e/SwishCtl

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Mar 05 2008 - 03:10:08 GMT
On Wed, Mar 05, 2008 at 11:18:58AM +1100, Sean wrote:
> Herman,
> >For paging, we use the oSW.SeekResult and the
> >oSW.NextResult. The oSW.SeekResult initialises the
> >start position and subsequently call oSW.NextResult
> >in a loop (pagesize times).
> >  
> Yes, that is what I am doing. It strikes me that, this is inefficient, 
> as the entire search results need to be returned, while only 10 (page 
> size) results are displayed.
> 
> Each time the user hits the next page of results, the same search is 
> executed and the entire result set returned again, but only the next 10 
> results are displayed.
> 
> It would be nice if we could limit the result set to just the records we 
> want..

You are forgetting a step.  Swish sorts the results.  So it can't
return a page of results until they are sorted, and they can't be
sorted until you have all the results.

Maybe you should fetch all the results, use something like memcached
to cache them and then do your paging as needed.  Write back and tell
us how much time you save.



-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs

_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Tue Mar 4 22:10:41 2008