You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by 5 Diamond IT <in...@smallbusinessconsultingexperts.com> on 2011/01/17 22:58:14 UTC

Any way to query by offset?

Say I do a query that matches 4000 documents. Is there a query syntax  or parser that would allow me to say retrieve offsets 1000, 2000, 3000?

I would prefer to not do multiple starts and limit 1's.

Thanks in advance.

Steve

Re: Any way to query by offset?

Posted by 5 Diamond IT <in...@smallbusinessconsultingexperts.com>.
Too bad for me I guess! I was hoping there was a hidden field, perhaps, offset one could query on. That one thing would have made this possible to do by simply querying on it.


On Jan 18, 2011, at 7:06 AM, Erick Erickson wrote:

> Ahhh, I see. I don't know of any way to do what you want.
> 
> Best
> Erick
> 
> On Mon, Jan 17, 2011 at 7:25 PM, 5 Diamond IT <
> info@smallbusinessconsultingexperts.com> wrote:
> 
>> I want to start at row 1000, 2000, and 3000 and retrieve those 3 rows ONLY
>> from the result set of whatever search was used. Yes, I can do 3 queries,
>> start=1000 and limit 1, etc., but, want ONE query to get those 3 rows from
>> the result set.
>> 
>> It's the poor mans way of doing price buckets the way I want them to be.
>> 
>> So, what I need that they do not provide is the ability to find those 3
>> rows out of the result set in one query. Was hoping for a function, a parser
>> that supported this perhaps, some hidden field I am not aware of I could
>> simply match on, any trick that would work.
>> 
>> 
>> 
>> 


Re: Any way to query by offset?

Posted by Erick Erickson <er...@gmail.com>.
Ahhh, I see. I don't know of any way to do what you want.

Best
Erick

On Mon, Jan 17, 2011 at 7:25 PM, 5 Diamond IT <
info@smallbusinessconsultingexperts.com> wrote:

> I want to start at row 1000, 2000, and 3000 and retrieve those 3 rows ONLY
> from the result set of whatever search was used. Yes, I can do 3 queries,
> start=1000 and limit 1, etc., but, want ONE query to get those 3 rows from
> the result set.
>
> It's the poor mans way of doing price buckets the way I want them to be.
>
> So, what I need that they do not provide is the ability to find those 3
> rows out of the result set in one query. Was hoping for a function, a parser
> that supported this perhaps, some hidden field I am not aware of I could
> simply match on, any trick that would work.
>
>
>
>
> On Jan 17, 2011, at 6:13 PM, Erick Erickson wrote:
>
> > Have you seen the "start" and "rows" parameters? If they don't work,
> > perhaps you could explain what you need that they don't provide.
> >
> > Best
> > Erick
> >
> > On Mon, Jan 17, 2011 at 4:58 PM, 5 Diamond IT <
> > info@smallbusinessconsultingexperts.com> wrote:
> >
> >> Say I do a query that matches 4000 documents. Is there a query syntax
>  or
> >> parser that would allow me to say retrieve offsets 1000, 2000, 3000?
> >>
> >> I would prefer to not do multiple starts and limit 1's.
> >>
> >> Thanks in advance.
> >>
> >> Steve
>
>

Re: Any way to query by offset?

Posted by 5 Diamond IT <in...@smallbusinessconsultingexperts.com>.
I want to start at row 1000, 2000, and 3000 and retrieve those 3 rows ONLY from the result set of whatever search was used. Yes, I can do 3 queries, start=1000 and limit 1, etc., but, want ONE query to get those 3 rows from the result set.

It's the poor mans way of doing price buckets the way I want them to be.

So, what I need that they do not provide is the ability to find those 3 rows out of the result set in one query. Was hoping for a function, a parser that supported this perhaps, some hidden field I am not aware of I could simply match on, any trick that would work.




On Jan 17, 2011, at 6:13 PM, Erick Erickson wrote:

> Have you seen the "start" and "rows" parameters? If they don't work,
> perhaps you could explain what you need that they don't provide.
> 
> Best
> Erick
> 
> On Mon, Jan 17, 2011 at 4:58 PM, 5 Diamond IT <
> info@smallbusinessconsultingexperts.com> wrote:
> 
>> Say I do a query that matches 4000 documents. Is there a query syntax  or
>> parser that would allow me to say retrieve offsets 1000, 2000, 3000?
>> 
>> I would prefer to not do multiple starts and limit 1's.
>> 
>> Thanks in advance.
>> 
>> Steve


Re: Any way to query by offset?

Posted by Markus Jelsma <ma...@openindex.io>.
I think Steve wants the 1000th, 2000th and 3000th document from the query. And 
since there's no method of doing so you're constrained to executing three 
queries with rows=1 and start is resp. 1000, 2000 and 3000.

If you want these documents to return you will have to do multiple queries 
with different start and limit=1 parameters.

> Have you seen the "start" and "rows" parameters? If they don't work,
> perhaps you could explain what you need that they don't provide.
> 
> Best
> Erick
> 
> On Mon, Jan 17, 2011 at 4:58 PM, 5 Diamond IT <
> 
> info@smallbusinessconsultingexperts.com> wrote:
> > Say I do a query that matches 4000 documents. Is there a query syntax  or
> > parser that would allow me to say retrieve offsets 1000, 2000, 3000?
> > 
> > I would prefer to not do multiple starts and limit 1's.
> > 
> > Thanks in advance.
> > 
> > Steve

Re: Any way to query by offset?

Posted by Erick Erickson <er...@gmail.com>.
Have you seen the "start" and "rows" parameters? If they don't work,
perhaps you could explain what you need that they don't provide.

Best
Erick

On Mon, Jan 17, 2011 at 4:58 PM, 5 Diamond IT <
info@smallbusinessconsultingexperts.com> wrote:

> Say I do a query that matches 4000 documents. Is there a query syntax  or
> parser that would allow me to say retrieve offsets 1000, 2000, 3000?
>
> I would prefer to not do multiple starts and limit 1's.
>
> Thanks in advance.
>
> Steve