lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <>
Subject [jira] Commented: (LUCENE-1045) SortField.AUTO doesn't work with long
Date Mon, 26 Nov 2007 19:45:43 GMT


Grant Ingersoll commented on LUCENE-1045:

This patch seems a bit strange to me (sorry for getting to it so late).  I think the better
way might be to have the FieldSortedHitQueue#comparatorAuto method use the ExtendedFieldCache,
instead of creating the dependency in FieldCacheImpl on ExtendedFieldCache to have long support.

Then, you could just override getAuto in ExtendedFieldCache.   

This way, those who have longs and want them treated as such get them from the ExtendedFC,
otherwise, those just using FieldCacheImpl, get the behavior they are used to, namely no long

> SortField.AUTO doesn't work with long
> -------------------------------------
>                 Key: LUCENE-1045
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.2
>            Reporter: Daniel Naber
>            Priority: Minor
>             Fix For: 2.3
>         Attachments: auto-long-sorting.diff,
> 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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message