lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject NumberFormatException when creating field cache
Date Thu, 10 Sep 2009 03:25:28 GMT
I'm using Lucene 2.3.2 and have a date field used for sorting, which is 
YYYYMMDDHHMM.  I get an exception when the FieldCache is being generated as follows:

java.lang.NumberFormatException: For input string: "190400-412317"
         at java.lang.Long.parseLong(
         at java.lang.Long.parseLong($1.parseLong($3.createValue($Cache.get($1.createValue($Cache.get(<init>(

I'm not able to get onto the server that has the index DB at the moment, but I 
expect my data is corrupt in the index.  That may have been because I have not 
validated certain data given by a 'trusted' source, however, the problem now is 
that assuming that data exists as it is, I am then unable to ever sort on the 
date field.

It maybe that the original data for the Document is no longer available, so 
deleting and re-creating may not be an option.

Would it be useful to allow some sort of data tolerance when creating these 
caches?  At least now the only solution is to delete that Document.  Perhaps the 
values could then be returned as 0 in the Parser implementations for numeric 


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

View raw message