Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Breaking up a query results based upon ROWNUM or something similar?

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


dkunzman at usgs

Mar 21, 2012, 7:18 AM

Post #1 of 2 (190 views)
Permalink
Breaking up a query results based upon ROWNUM or something similar?

I'm new to lucene and have searched the archives and FAQ for an answer on
how to do something and have found no information.

Our server is running SOLR and is running out of memory when returning
large result sets.

I was curious if anyone there would know how to break up a query so that
returns only a first the 10000 results, and then the next 10000 results,
from query that would normally return a 100000?

Something like this in Oracle speech...

select * from
( select a.*, ROWNUM rnum from
( ) a
where ROWNUM <= :MAX_ROW_TO_FETCH )
where rnum >= :MIN_ROW_TO_FETCH;

thanks,
Doug


erickerickson at gmail

Mar 21, 2012, 11:43 AM

Post #2 of 2 (186 views)
Permalink
Re: Breaking up a query results based upon ROWNUM or something similar? [In reply to]

Sure, in Solr you can specify start/rows parameters on queries like:
&start=0&rows=10000
&start=10000&rows=10000
&start=20000&rows=10000

You'll hit the "deep paging" problem, however. Briefly as you page deeper and
deeper you're response time will drop, see:
https://issues.apache.org/jira/browse/SOLR-1726

Best
Erick

On Wed, Mar 21, 2012 at 10:18 AM, Doug Kunzman <dkunzman [at] usgs> wrote:
> I'm new to lucene and have searched the archives and FAQ for an answer on
> how to do something and have found no information.
>
> Our server is running SOLR and is running out of memory when returning
> large result sets.
>
> I was curious if anyone there would know how to break up a query so that
> returns only a first the 10000 results, and then the next 10000 results,
> from query that would normally return a 100000?
>
> Something like this in Oracle speech...
>
> select * from
> ( select a.*, ROWNUM rnum from
> ( ) a
> where ROWNUM <= :MAX_ROW_TO_FETCH )
> where rnum >= :MIN_ROW_TO_FETCH;
>
> thanks,
> Doug
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.