lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: about some date store
Date Wed, 11 Jul 2012 09:15:15 GMT
Hi,

Use NumericField and NumericRangeQuery to query. For sorting use the
corresponding datatype. In the numeric field you would parse the date to a
number (e.g. milliseconds since epoch) and index it using NumericField. To
print them, use SimpleDateFormat or whatever to convert the numeric value
back to a date after you got the results.

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


> -----Original Message-----
> From: sam [mailto:hairen512@yahoo.com.cn]
> Sent: Wednesday, July 11, 2012 10:32 AM
> To: java-user@lucene.apache.org
> Subject: about some date store
> 
> I want store some data like 00:00:00.123,it's string,i want print it as
date
> .because i want sort it as date's increase.
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/about-
> some-date-store-tp3994330.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