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

FacetResultNode should be a simple bin, not interface

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2, 6.0
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      FacetResultNode is an interface with a bunch of getter methods. The purpose, I believe, was to return an object that does not allow you modify it. But that's overly defensive I think. I.e., we return to users ScoredDoc and they can happily modify 'doc' and 'score'. If users modify the members' values, they can only affect themselves, as this object is returned after the search has completed.

      Anyway, today it doesn't even defend itself right, because you can call getSubResults and remove/add elements from the list ...

      I want to make it a simple bin, w/ public members and get rid of MutableFacetResultNode. Will keep the class not final, since it might be useful for someone to extend it and add additional members, for his/her FacetsCollector purposes.

        Activity

        Hide
        mikemccand Michael McCandless added a comment -

        +1

        Show
        mikemccand Michael McCandless added a comment - +1
        Hide
        shaie Shai Erera added a comment -

        Patch makes FacetResultNode concrete class with public members. Also removes MutableFacetResultNode.

        Tests pass, I think this is ready to commit.

        Show
        shaie Shai Erera added a comment - Patch makes FacetResultNode concrete class with public members. Also removes MutableFacetResultNode. Tests pass, I think this is ready to commit.
        Hide
        commit-tag-bot Commit Tag Bot added a comment -

        [trunk commit] Shai Erera
        http://svn.apache.org/viewvc?view=revision&revision=1436277

        LUCENE-4697: make FacetResultNode a simple bin

        Show
        commit-tag-bot Commit Tag Bot added a comment - [trunk commit] Shai Erera http://svn.apache.org/viewvc?view=revision&revision=1436277 LUCENE-4697 : make FacetResultNode a simple bin
        Hide
        shaie Shai Erera added a comment -

        Committed to trunk and 4x.

        Show
        shaie Shai Erera added a comment - Committed to trunk and 4x.
        Hide
        commit-tag-bot Commit Tag Bot added a comment -

        [branch_4x commit] Shai Erera
        http://svn.apache.org/viewvc?view=revision&revision=1436281

        LUCENE-4697: make FacetResultNode a simple bin

        Show
        commit-tag-bot Commit Tag Bot added a comment - [branch_4x commit] Shai Erera http://svn.apache.org/viewvc?view=revision&revision=1436281 LUCENE-4697 : make FacetResultNode a simple bin
        Hide
        thetaphi Uwe Schindler added a comment -

        Closed after release.

        Show
        thetaphi Uwe Schindler added a comment - Closed after release.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development