lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: is this the right way to go?
Date Thu, 10 Jun 2010 08:46:44 GMT
You should use NumericField with precisionStep MAX_VALUE as field you sort
against (represent the date as an integer/long like got from
Date.getTime()). This costs much less memory, as its not sorted as strings,
but with native data types, so the FieldCache needs much less space. If you
also want to do RangeQueries on a numeric Range, use the default

More information is the JavaDocs of NumericRangeQuery and NumericField.


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: fujian []
> Sent: Thursday, June 10, 2010 4:03 AM
> To:
> Subject: Re: is this the right way to go?
> Thanks Eric and Ian!
> Yes, time stamp is one of our sort fields. By splitting it into
> year/month/day/... it'll reduce the memory usage dramatically. But I don't
> know if we can specify the significance of the sort fields, like year
> followed by month, day ... etc.
> Another thing is about unique. I thought it was unique "field value". If
> means unique term, for English even loading all around 300,000 terms it
> won't take much memory, right? (Suppose the average length of term is 10,
> the total memory usage is 10*300,000=3MB)
> Thanks again, this helps a lot!
> -Fujian
> --
> View this message in context:
> the-right-way-to-go-tp883464p884302.html
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message