Hello Siraj,

You can do this by creating a Lucene document that has 3
org.apache.lucene.document.IntRange fields in it, one for each of the
ranges that you would like to index. Lucene will then match the document if
any of the ranges matches.

On Tue, Nov 5, 2024 at 5:16 PM Siraj Haider
<siraj.hai...@jobdiva.com.invalid> wrote:

> Hello there,
>
> I want to index multiple numeric ranges in lucene index and then perform
> range searches on it. For examples, I want to index 3 numeric ranges 1-5,
> 7-10, 13-20 and then run a search with a range (i.e. 2-4) as criteria and
> have it return the document if searched range is part of any of the indexed
> ranges. What would be the best way to go about it?
>
>
>
> *Siraj Haider*
>
> Technology
>
> JobDiva
>
> siraj.hai...@jobdiva.com
>
> 212-306-0154
>
> 44 Wall Street, New York, NY 10005
>
> *jobdiva.com <https://jobdiva.com/>*
>
> The content of this email is confidential and intended for the recipient
> specified in message only. It is strictly forbidden to share any part of
> this message with any third party, without a written consent of the sender.
> If you received this message by mistake, please reply to this message and
> follow with its deletion, so that we can ensure such a mistake does not
> occur in the future.
>
>
>
>
>
>
>
> ------------------------------
>
> This electronic mail message and any attachments may contain information
> which is privileged, sensitive and/or otherwise exempt from disclosure
> under applicable law. The information is intended only for the use of the
> individual or entity named as the addressee above. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution (electronic or otherwise) or forwarding of, or the taking of
> any action in reliance on, the contents of this transmission is strictly
> prohibited. If you have received this electronic transmission in error,
> please notify us by telephone, facsimile, or e-mail as noted above to
> arrange for the return of any electronic mail or attachments. Thank You.
>


-- 
Adrien

Reply via email to