Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.6, 5.0
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Today RangeAccumulator assumes the ranges should be read from a NumericDocValues field. Would be good if we can modify it, or introduce a new ValueSourceAccumulator which allows you to range-facet on any ValueSource, e.g. one that is generated from an expression.

      1. LUCENE-5297.patch
        9 kB
        Shai Erera
      2. LUCENE-5297.patch
        7 kB
        Shai Erera

        Activity

        Hide
        Shai Erera added a comment -

        Patch extends RangeFacetRequest to take also a ValueSource and represents the NDV case as LongFieldSource. Also modified RangeAccumulator to use FunctionValues instead of NDV. All TestRangeAccumulator tests pass.

        I have nocommits around jdocs, will handle them later. More important is whether this approach is OK, or is it better to separate the accumulator to an NDV one and ValueSource one (I think not, but perhaps others think differently).

        Show
        Shai Erera added a comment - Patch extends RangeFacetRequest to take also a ValueSource and represents the NDV case as LongFieldSource. Also modified RangeAccumulator to use FunctionValues instead of NDV. All TestRangeAccumulator tests pass. I have nocommits around jdocs, will handle them later. More important is whether this approach is OK, or is it better to separate the accumulator to an NDV one and ValueSource one (I think not, but perhaps others think differently).
        Hide
        Michael McCandless added a comment -

        +1, patch looks good!

        Show
        Michael McCandless added a comment - +1, patch looks good!
        Hide
        Shai Erera added a comment -

        Handled the nocommits (improved javadocs). All range tests pass and I see no reason to exercise the API by passing other ValueSources, as the NDV ones are simulated through LongFieldSource. I think it's ready!

        Show
        Shai Erera added a comment - Handled the nocommits (improved javadocs). All range tests pass and I see no reason to exercise the API by passing other ValueSources, as the NDV ones are simulated through LongFieldSource. I think it's ready!
        Hide
        ASF subversion and git services added a comment -

        Commit 1538863 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1538863 ]

        LUCENE-5297: allow range faceting on any ValueSource

        Show
        ASF subversion and git services added a comment - Commit 1538863 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1538863 ] LUCENE-5297 : allow range faceting on any ValueSource
        Hide
        ASF subversion and git services added a comment -

        Commit 1538864 from Shai Erera in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1538864 ]

        LUCENE-5297: allow range faceting on any ValueSource

        Show
        ASF subversion and git services added a comment - Commit 1538864 from Shai Erera in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1538864 ] LUCENE-5297 : allow range faceting on any ValueSource
        Hide
        Shai Erera added a comment -

        Committed to trunk and 4x.

        Show
        Shai Erera added a comment - Committed to trunk and 4x.

          People

          • Assignee:
            Shai Erera
            Reporter:
            Shai Erera
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development