You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2014/02/20 02:57:23 UTC

[jira] [Resolved] (LUCENE-5454) SortField for SortedSetDV

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

Robert Muir resolved LUCENE-5454.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0
                   4.8

> SortField for SortedSetDV
> -------------------------
>
>                 Key: LUCENE-5454
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5454
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/other
>            Reporter: Robert Muir
>             Fix For: 4.8, 5.0
>
>         Attachments: LUCENE-5454.patch, LUCENE-5454.patch
>
>
> Currently, its not possible to sort by a sortedsetdv (e.g. a multi-valued field). So the idea is to provide some comparators that let you do this: by choosing a selector (e.g. min/max/median type stuff) that picks a value from the set as a representative sort value.
> The implementation is pretty simple, just actually wrap the SortedSet in a SortedDV that does the selection, and re-use the existing TermOrdValComparator logic.
> One issue is that, with the current sortedset API only 'min' is a viable option because its the only one that can be done in constant time. So this patch adds an optional extension (RandomAccessOrds) for codecs that can support random access. I added this to the default codec, diskdv, and direct, as they can all easily support it. While this could be useful for other purposes (e.g. min/max as valuesource or whatever), i think its best to be optional because it prevents some forms of encoding/compression.
> Anyway I'm targeting lucene/sandbox with this change... 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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