Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8, 6.0
    • Component/s: modules/other
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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...

      1. LUCENE-5454.patch
        66 kB
        Robert Muir
      2. LUCENE-5454.patch
        66 kB
        Robert Muir

        Activity

        Hide
        Robert Muir added a comment -

        patch

        Show
        Robert Muir added a comment - patch
        Hide
        Adrien Grand added a comment -

        +1 I like the approach and the fact that this is an optional API

        Show
        Adrien Grand added a comment - +1 I like the approach and the fact that this is an optional API
        Hide
        Robert Muir added a comment -

        trivial updates:

        • delegate lookupTerm (called across segment transitions, etc) directly to the underlying SSDV, several codecs including the default have an optimized impl.
        • fix some javadocs and formatting of error messages
        Show
        Robert Muir added a comment - trivial updates: delegate lookupTerm (called across segment transitions, etc) directly to the underlying SSDV, several codecs including the default have an optimized impl. fix some javadocs and formatting of error messages
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1570031 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1570031 ]

        LUCENE-5454: SortField for SortedSetDV

        Show
        ASF subversion and git services added a comment - Commit 1570031 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1570031 ] LUCENE-5454 : SortField for SortedSetDV
        Hide
        ASF subversion and git services added a comment -

        Commit 1570050 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1570050 ]

        LUCENE-5454: SortField for SortedSetDV

        Show
        ASF subversion and git services added a comment - Commit 1570050 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1570050 ] LUCENE-5454 : SortField for SortedSetDV
        Hide
        ASF subversion and git services added a comment -

        Commit 1570624 from Steve Rowe in branch 'dev/trunk'
        [ https://svn.apache.org/r1570624 ]

        LUCENE-5454: intellij config

        Show
        ASF subversion and git services added a comment - Commit 1570624 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1570624 ] LUCENE-5454 : intellij config
        Hide
        ASF subversion and git services added a comment -

        Commit 1570625 from Steve Rowe in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1570625 ]

        LUCENE-5454: intellij config (merged trunk r1570624)

        Show
        ASF subversion and git services added a comment - Commit 1570625 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1570625 ] LUCENE-5454 : intellij config (merged trunk r1570624)
        Hide
        Uwe Schindler added a comment -

        Close issue after release of 4.8.0

        Show
        Uwe Schindler added a comment - Close issue after release of 4.8.0

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development