lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2671) Add sort missing first/last ability to SortField and ValueComparator
Date Sat, 16 Oct 2010 20:46:22 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921760#action_12921760
] 

Robert Muir commented on LUCENE-2671:
-------------------------------------

bq. What part of the API is broken? 

DocTermsCreator

bq. The assumptions about what is in the Map are are internal to a private member that can
not be touched outside this ugly class.

This is a public class.

It is parameterized as T extends DocTerms, but 
{noformat}
  @Override
  public T create(IndexReader reader) throws IOException {
{noformat}

This is not true, it returns DocTermCreator.DocTermsImpl and gives an ugly cast
{noformat}
    final T t =
      (T)new DocTermsImpl(bytes.freeze(true), docToOffset.getMutable());
    return t;
{noformat}

The api doesn't look extensible to me, I'm surprised it works. I guess this is why the compiler
complains.

Granted i didnt take a lot of time to look it over, but the compiler warnings speak loudly
enough in my favor.


> 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-caches.patch, 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


Mime
View raw message