You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Siraj Haider <si...@jobdiva.com> on 2009/10/09 22:46:40 UTC

Using Numeric Field

Hi,
I have a Date field in my Lucene index that is currently stored as a 
String field with format: YYYYMMDDHHMISS.  I perform RangeFilter on it 
when searching and also sort the results specifying it as a String 
field.  My question is, will converting it to a Numeric field and start 
using NumericRangeFilter and sorting based on numeric field will give me 
some performance gain? or will it be insignificant?

thanks
-siraj


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.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Using Numeric Field

Posted by Jake Mannix <ja...@gmail.com>.
If you are really using all of that precision (down to the second) the
short answer is YES.

If you can remove much of that precision (only keep down to the day,
for example), then you may be able to get perfectly good performance
with strings alone when the range is only over a small set of terms,
although it's possible even here you will get a performance gain with
NumericRangeFilter.

  -jake


On Fri, Oct 9, 2009 at 1:46 PM, Siraj Haider <si...@jobdiva.com> wrote:

> Hi,
> I have a Date field in my Lucene index that is currently stored as a
> String field with format: YYYYMMDDHHMISS.  I perform RangeFilter on it
> when searching and also sort the results specifying it as a String
> field.  My question is, will converting it to a Numeric field and start
> using NumericRangeFilter and sorting based on numeric field will give me
> some performance gain? or will it be insignificant?
>
> thanks
> -siraj
>
>
> 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.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>