lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheolgoo Kang <app...@gmail.com>
Subject Re: [jira] Commented: (LUCENE-463) Sorting does not work correcly on "String Date"
Date Sat, 26 Nov 2005 00:02:11 GMT
Thanks Yonik for your kind explanation.

On 11/26/05, Yonik Seeley (JIRA) <jira@apache.org> wrote:
>     [ http://issues.apache.org/jira/browse/LUCENE-463?page=comments#action_12358524 ]
>
> Yonik Seeley commented on LUCENE-463:
> -------------------------------------
>
> Yep, I verified that AUTO sorting is your problem.
> In FieldCacheImpl for an AUTO type, first Integer.parseInt() is tried, and if that fails,
> Float.parseFloat() is tried.
> For your case, parseInt() will fail because it's too big, but parseFloat() will work
(but not with enough precision).
>
> Float.parseFloat("20051004130501")=2.00510045E13
> Float.parseFloat("20051006102501")=2.00510066E13
> Float.parseFloat("20051005102501")=2.00510045E13
>
> Notice how two of the strings map to the same float when parsed as such.
>
> > Sorting does not work correcly on "String Date"
> > -----------------------------------------------
> >
> >          Key: LUCENE-463
> >          URL: http://issues.apache.org/jira/browse/LUCENE-463
> >      Project: Lucene - Java
> >         Type: Bug
> >  Environment: Java Windows XP, JRE 1.3.1
> >     Reporter: Etienne
> >     Priority: Minor
>
> >
> > I am doing a simple query with a sort on a date field already put on a string format
(YYYYmmDDHHMMSS). I am presenting 10 results per pages. The results I have is not correctly
sort. On a page "4 october" is before "5 october", on another page I got the same kind of
error.
> > These are logs of the sorting I get:
> > 20051006102501 DATE: 06 oct. 2005
> > 20051004130501 DATE: 04 oct. 2005 <-- PROBLEM!
> > 20051005120200 DATE: 05 oct. 2005
> > 20050928094805 DATE: 28 sept. 2005
> > 20050928114901 DATE: 28 sept. 2005
> > 20050928114901 DATE: 28 sept. 2005
> > 20050928101901 DATE: 28 sept. 2005
> > 20050928142601 DATE: 28 sept. 2005
> > 20050928142601 DATE: 28 sept. 2005
> > 20050929094100 DATE: 29 sept. 2005 <-- PROBLEM!
> > 20050928132931 DATE: 28 sept. 2005
> > 20050929090002 DATE: 29 sept. 2005 <-- PROBLEM!
> > 20050927203403 DATE: 27 sept. 2005
> > 20050927203402 DATE: 27 sept. 2005
> > 20050927131901 DATE: 27 sept. 2005
> > 20050927131901 DATE: 27 sept. 2005
> > 20050927132501 DATE: 27 sept. 2005
> > 20050927132500 DATE: 27 sept. 2005
> > 20050927133101 DATE: 27 sept. 2005
> > 20050927133100 DATE: 27 sept. 2005
> > 20050926115001 DATE: 26 sept. 2005
> > 20050927112301 DATE: 27 sept. 2005
> > 20050926091200 DATE: 26 sept. 2005 <-- PROBLEM!
> > 20050927085701 DATE: 27 sept. 2005
> > 20050923111558 DATE: 23 sept. 2005
> > 20050923103700 DATE: 23 sept. 2005
> > 20050923144300 DATE: 23 sept. 2005
> > 20050922102200 DATE: 22 sept. 2005
> > 20050922082701 DATE: 22 sept. 2005
> > 20050923085601 DATE: 23 sept. 2005 <-- PROBLEM!
> > 20050815102204 DATE: 15 august 2005
> > 20050815102201 DATE: 15 august 2005
> > 20050816102200 DATE: 16 august 2005  <-- PROBLEM!
> > 20050815110400 DATE: 15 august 2005
> > 20050816124500 DATE: 16 august 2005 <-- PROBLEM!
> > 20050812163334 DATE: 12 august 2005
> > 20050812163331 DATE: 12 august 2005
> > 20050812161840 DATE: 12 august 2005
> > 20050812161935 DATE: 12 août 2005
> > 20050812113442 DATE: 12 août 2005
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>


--
Cheolgoo

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


Mime
View raw message