Issue Details (XML | Word | Printable)

Key: LUCENE-1045
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Grant Ingersoll
Reporter: Daniel Naber
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

SortField.AUTO doesn't work with long

Created: 03/Nov/07 09:46 PM   Updated: 11/Oct/08 12:49 PM
Return to search
Component/s: Search
Affects Version/s: 2.2
Fix Version/s: 2.4

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works auto-long-sorting.diff 2007-11-03 09:48 PM Daniel Naber 4 kB
Text File Licensed for inclusion in ASF works LUCENE-1045-shortbyte.patch 2008-01-31 04:27 PM Grant Ingersoll 11 kB
Text File Licensed for inclusion in ASF works LUCENE-1045.patch 2007-12-03 05:30 PM Grant Ingersoll 67 kB
Text File Licensed for inclusion in ASF works LUCENE-1045.patch 2007-11-26 08:25 PM Grant Ingersoll 7 kB
Java Source File TestDateSort.java 2007-11-03 09:47 PM Daniel Naber 4 kB
Issue Links:
Dependants
 
Reference
 

Resolution Date: 02/Feb/08 03:09 AM


 Description  « Hide
This is actually the same as LUCENE-463 but I cannot find a way to re-open that issue. I'm attaching a test case by dragon-fly999 at hotmail com that shows the problem and a patch that seems to fix it.

The problem is that a long (as used for dates) cannot be parsed as an integer, and the next step is then to parse it as a float, which works but which is not correct. With the patch the following parsers are used in this order: int, long, float.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.