Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7673

Add MultiValued[Int/Long/Float/Double]FieldSource for SortedNumericDocValues

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0, 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Right now [Int/Long/Float/Double]FieldSource can give a ValueSource view of a NumericDocValues field. This Jira is to add MultiValued[Int/Long/Float/Double]FieldSource that given a SortedNumericSelector.Type can give a ValueSource view of a SortedNumericDocValues field
      I considered instead of adding new classes an optional selector parameter to the existing [Int/Long/Float/Double]FieldSource, but I think adding different classes makes a cleaner API and it’s clear that for MultiValued* case, the selector is a mandatory parameter.

      1. LUCENE-7673.patch
        43 kB
        Tomás Fernández Löbbe

        Activity

        Hide
        dsmiley David Smiley added a comment -

        +1 this looks nice Tomás. It'd be nice if DoubleValueSource and LongValueSource in Lucene core (recently added by Alan Woodward) would also gain this ability but that can be a separate issue.

        Show
        dsmiley David Smiley added a comment - +1 this looks nice Tomás. It'd be nice if DoubleValueSource and LongValueSource in Lucene core (recently added by Alan Woodward ) would also gain this ability but that can be a separate issue.
        Hide
        tomasflobbe Tomás Fernández Löbbe added a comment -

        Thanks for the review David!

        It'd be nice if DoubleValueSource and LongValueSource...

        Maybe we can add them later if needed? It looks like DoubleValueSource and LongValueSource instances can be obtained with ValueSource#asDoubleValuesSource() and ValueSource#asLongValuesSource(), is there anything else you'd add? Maybe the helper methods DoubleValuesSource.fromMultiValuedDoubleField(...)?

        Show
        tomasflobbe Tomás Fernández Löbbe added a comment - Thanks for the review David! It'd be nice if DoubleValueSource and LongValueSource ... Maybe we can add them later if needed? It looks like DoubleValueSource and LongValueSource instances can be obtained with ValueSource#asDoubleValuesSource() and ValueSource#asLongValuesSource() , is there anything else you'd add? Maybe the helper methods DoubleValuesSource.fromMultiValuedDoubleField(...) ?
        Hide
        dsmiley David Smiley added a comment -

        Again; it can wait for another issue of course. Your proposed name DoubleValuesSource.fromMultiValuedDoubleField(...) seems plausible... or perhaps simply overload fromDoubleField(...) to have one that takes the selector for how to treat a multi-valued field.

        Show
        dsmiley David Smiley added a comment - Again; it can wait for another issue of course. Your proposed name DoubleValuesSource.fromMultiValuedDoubleField(...) seems plausible... or perhaps simply overload fromDoubleField(...) to have one that takes the selector for how to treat a multi-valued field.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 7f13105fbe0023771b581c0423df7eaa6a76335e in lucene-solr's branch refs/heads/master from Tomas Fernandez Lobbe
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7f13105 ]

        LUCENE-7673: Add MultiValued[Int/Long/Float/Double]FieldSource for SortedNumericDocValues

        Show
        jira-bot ASF subversion and git services added a comment - Commit 7f13105fbe0023771b581c0423df7eaa6a76335e in lucene-solr's branch refs/heads/master from Tomas Fernandez Lobbe [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7f13105 ] LUCENE-7673 : Add MultiValued [Int/Long/Float/Double] FieldSource for SortedNumericDocValues
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit c9c3fb489c822e0f46927167b39911e9ec7ac52a in lucene-solr's branch refs/heads/branch_6x from Tomas Fernandez Lobbe
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c9c3fb4 ]

        LUCENE-7673: Add MultiValued[Int/Long/Float/Double]FieldSource for SortedNumericDocValues

        Show
        jira-bot ASF subversion and git services added a comment - Commit c9c3fb489c822e0f46927167b39911e9ec7ac52a in lucene-solr's branch refs/heads/branch_6x from Tomas Fernandez Lobbe [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c9c3fb4 ] LUCENE-7673 : Add MultiValued [Int/Long/Float/Double] FieldSource for SortedNumericDocValues
        Hide
        tomasflobbe Tomás Fernández Löbbe added a comment -

        It'd be nice if DoubleValueSource and LongValueSource...

        Created LUCENE-7678

        Show
        tomasflobbe Tomás Fernández Löbbe added a comment - It'd be nice if DoubleValueSource and LongValueSource ... Created LUCENE-7678

          People

          • Assignee:
            tomasflobbe Tomás Fernández Löbbe
            Reporter:
            tomasflobbe Tomás Fernández Löbbe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development