You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2010/10/14 02:29:32 UTC

[jira] Updated: (LUCENE-2671) Add sort missing first/last ability to SortField and ValueComparator

     [ https://issues.apache.org/jira/browse/LUCENE-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated LUCENE-2671:
----------------------------------

    Attachment: LUCENE-2671-suppress-unchecked.patch

here is a patch that ignores all the unchecked casts
{code:java}
 @SuppressWarnings("unchecked")
{code}

I don't think there is any way around this for the current design -- in LUCENE-2665, the cache would directly use the generic map, but for the baby step it needs a cast.

The issues is that we have:
{code:java}
private Map<Class<?>,Cache> caches;
{code}

and really need to be able to define something like:
{code:java}
private Map<Class<X>,Cache<? extends X>> caches;
{code}
where X depends on what you put into the map...  but that is not possible as far as I know.

- - -

I would commit this, but the build is failing for other reasons....  



> Add sort missing first/last ability to SortField and ValueComparator
> --------------------------------------------------------------------
>
>                 Key: LUCENE-2671
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2671
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 4.0
>
>         Attachments: LUCENE-2671-SortMissingLast.patch, LUCENE-2671-suppress-unchecked.patch
>
>
> When SortField and ValueComparator use EntryCreators (from LUCENE-2649) they use a special sort value when the field is missing.
> This enables lucene to implement 'sort missing last' or 'sort missing first' for numeric values from the FieldCache.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org