lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
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
precisionStep.

More information is the JavaDocs of NumericRangeQuery and NumericField.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: fujian [mailto:fujian.z.yang@nokia.com]
> Sent: Thursday, June 10, 2010 4:03 AM
> To: java-user@lucene.apache.org
> 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
first,
> followed by month, day ... etc.
> 
> Another thing is about unique. I thought it was unique "field value". If
it
> 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: http://lucene.472066.n3.nabble.com/is-this-
> the-right-way-to-go-tp883464p884302.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



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


Mime
View raw message