Lucene - Core
  1. Lucene - Core
  2. LUCENE-4426

New ValueSource implementations that wrap DocValues

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, Trunk
    • Component/s: modules/other
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We should have ValueSource implementations that wrap DocValues in lucene-queries so that DocValues can be used in function queries.

      1. LUCENE-4426.patch
        35 kB
        Adrien Grand
      2. LUCENE-4426.patch
        32 kB
        Adrien Grand
      3. LUCENE-4426.patch
        40 kB
        Adrien Grand

        Activity

        Adrien Grand created issue -
        Hide
        Adrien Grand added a comment -

        This patch adds ValueSource implementations for ints, longs, floats, doubles, dates and UTF8-encoded Strings.

        Show
        Adrien Grand added a comment - This patch adds ValueSource implementations for ints, longs, floats, doubles, dates and UTF8-encoded Strings.
        Adrien Grand made changes -
        Field Original Value New Value
        Attachment LUCENE-4426.patch [ 12546555 ]
        Hide
        Robert Muir added a comment -

        How does this relate to NumericIndexDocValueSource?

        I am confused why the current one only handles 3 types?

        Show
        Robert Muir added a comment - How does this relate to NumericIndexDocValueSource? I am confused why the current one only handles 3 types?
        Hide
        Adrien Grand added a comment -

        How does this relate to NumericIndexDocValueSource?

        I didn't know about this class! Maybe the new classes of my patch could replace this one:

        • the objectVal method returns an object whose type matches the ValueSource name,
        • there is the StrDocValuesFieldSource to deal with DocValues.Type.BYTES* when they are UTF8-encoded Strings
        • they use a default source when the segment has no DocValues
        • they give the ability to load direct sources

        (My goal is to reuse them in SOLR-3855)

        I am confused why the current one only handles 3 types?

        Right. Strange that it is able to deal with VAR_INTS but none of FIXED_INTS_*.

        Show
        Adrien Grand added a comment - How does this relate to NumericIndexDocValueSource? I didn't know about this class! Maybe the new classes of my patch could replace this one: the objectVal method returns an object whose type matches the ValueSource name, there is the StrDocValuesFieldSource to deal with DocValues.Type.BYTES* when they are UTF8-encoded Strings they use a default source when the segment has no DocValues they give the ability to load direct sources (My goal is to reuse them in SOLR-3855 ) I am confused why the current one only handles 3 types? Right. Strange that it is able to deal with VAR_INTS but none of FIXED_INTS_*.
        Hide
        Robert Muir added a comment -

        I think the previous patch was done before additional fixed types were added.

        We could always deprecate the old one (probably should deprecate AND fix it if we do that).

        Your patch is better (e.g. checks hasArray, etc) from the implementation side.

        The only thing i dont get is if maybe it really should just be one class like the old one.
        I dont know why we need Int/Float versions of the classes when these implementations have
        things like intVal()/floatVal()/doubleVal()...

        Show
        Robert Muir added a comment - I think the previous patch was done before additional fixed types were added. We could always deprecate the old one (probably should deprecate AND fix it if we do that). Your patch is better (e.g. checks hasArray, etc) from the implementation side. The only thing i dont get is if maybe it really should just be one class like the old one. I dont know why we need Int/Float versions of the classes when these implementations have things like intVal()/floatVal()/doubleVal()...
        Hide
        Adrien Grand added a comment -

        Right, it makes sense to have all numeric types in the same class. Here is a new patch that also adds FIXED_INTS_* support to NumericIndexDocValueSource and adds a deprecation notice.

        Show
        Adrien Grand added a comment - Right, it makes sense to have all numeric types in the same class. Here is a new patch that also adds FIXED_INTS_* support to NumericIndexDocValueSource and adds a deprecation notice.
        Adrien Grand made changes -
        Attachment LUCENE-4426.patch [ 12546579 ]
        Hide
        Adrien Grand added a comment -

        New patch :

        • added optimisation when SortedSource.hasPackedDocToOrd() is true,
        • a few more tests.
        Show
        Adrien Grand added a comment - New patch : added optimisation when SortedSource.hasPackedDocToOrd() is true, a few more tests.
        Adrien Grand made changes -
        Attachment LUCENE-4426.patch [ 12547963 ]
        Hide
        Adrien Grand added a comment -

        Committed (r1394513 on trunk and r1394529 on the 4.x branch).

        Show
        Adrien Grand added a comment - Committed (r1394513 on trunk and r1394529 on the 4.x branch).
        Adrien Grand made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Adrien Grand
        http://svn.apache.org/viewvc?view=revision&revision=1394529

        LUCENE-4426: ValueSource implementations for DocValues fields (merged from r1394513).

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1394529 LUCENE-4426 : ValueSource implementations for DocValues fields (merged from r1394513).
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        9d 21h 35m 1 Adrien Grand 05/Oct/12 15:44
        Resolved Resolved Closed Closed
        216d 19h 49m 1 Uwe Schindler 10/May/13 11:33

          People

          • Assignee:
            Adrien Grand
            Reporter:
            Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development