lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3518) Add sort-by-term with DocValues
Date Thu, 20 Oct 2011 12:52:15 GMT

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

Simon Willnauer commented on LUCENE-3518:
-----------------------------------------

mike, I looked at it again and found this api addition. You return a PackedInts.Reader from
getDocToOrd() on SortedSource

{code}
/**
 * Returns the PackedInts.Reader impl that maps document to ord.
 */
public PackedInts.Reader getDocToOrd() {
  return null;
}

{code}

this seems to be very specific to in-memory docvalues while we don't support direct source
here. Can we maybe extract an interface from PackedInts.Reader & RandomAccessReaderIterator
(those are already very similar) so we can simply use the reader interface for both on-disk
and in-memory variants. then I think this API addition is fine. I don't like apis which are
in-mem / on-disk only. 
                
> Add sort-by-term with DocValues
> -------------------------------
>
>                 Key: LUCENE-3518
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3518
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: core/search
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.0
>
>         Attachments: LUCENE-3518.patch, LUCENE-3518.patch
>
>
> There are two sorted byte[] types with DocValues (BYTES_VAR_SORTED,
> BYTES_FIXED_SORTED), so you can index this type, but you can't yet
> sort by it.
> So I added a FieldComparator just like TermOrdValComparator, except it
> pulls from the doc values instead.
> There are some small diffs, eg with doc values there are never null
> values (see LUCENE-3504).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message