Best way of getting X before and Y after long Z

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Best way of getting X before and Y after long Z

Robin Verlangen
Hi there,

What's the best way in terms of performance to get for example 5 documents before, and 10 documents after, around a certain long value?

The long value is an internal sequence number which is atomic for the order of documents.

Best regards, 

Robin Verlangen
Data Architect




Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Best way of getting X before and Y after long Z

phill
On 5/4/2013 10:49 AM, Robin Verlangen wrote:
> Hi there,
>
> What's the best way in terms of performance to get for example 5
> documents before, and 10 documents after, around a certain long value?
>
> The long value is an internal sequence number which is atomic for the
> order of documents.
>
Have you looked into numeric range queries?

-Paul

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Best way of getting X before and Y after long Z

Robin Verlangen
Hi Paul,

Yes, for some reason I totally missed this while looking at the documentation. I already implemented it and it works just fine.

Thanks!

Best regards, 

Robin Verlangen
Data Architect




Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies.


On Mon, May 6, 2013 at 6:23 PM, Paul Hill <[hidden email]> wrote:
On 5/4/2013 10:49 AM, Robin Verlangen wrote:
Hi there,

What's the best way in terms of performance to get for example 5 documents before, and 10 documents after, around a certain long value?

The long value is an internal sequence number which is atomic for the order of documents.

Have you looked into numeric range queries?

-Paul

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.