Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9404

JSON FacetFieldProcessor subclass rename/moves

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.2
    • Component/s: Facet Module
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      ... spinoff of my comment on https://issues.apache.org/jira/browse/SOLR-9142?focusedCommentId=15408535&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15408535 ...

      • taste: the fact that some FFP's are declared within FacetField.java and some are top-level is bad IMO; they should all be top-level once any subclasses start becoming so.
      • FFPFCBase: This is basically the base class for array based accumulator implementations – i.e. direct slot/value accumulators. I suggest rename to FFPArray. It can handle terms (strings), not numbers directly but those encoded as terms, and multi-valued capable.
      • FFPDV: Rename to FFPArrayDV: accesses terms from DocValues
      • FFPUIF: Rename to FFPArrayUIF: accesses terms via UIF, kind of a pseudo-DV
      • FFPNumeric: Rename to FFPHashDV: Now currently this thing is expressly for single-valued numeric DocValues. In SOLR-9142 (not here) I intend to make this generic to handle terms by global ordinal.
      • FFPStream: Rename to FFPEnumTerms: This does enumeration (not hash or array accumulation), and it gets data from Terms. Perhaps Stream could also go in the name but I think Enum is more pertinent. One day once we have PointValues in Solr, we might add a FFPEnumPoints. Note that such a thing wouldn't stream, since that API uses a callback API instead of an iterator style.
      1. SOLR_9404.patch
        92 kB
        David Smiley

        Activity

        Hide
        dsmiley David Smiley added a comment -

        Here's the patch.

        I added "By" as in "FacetFieldProcessorByArray" to avoid making it looking like these things are arrays or hash tables.

        • Reordered some methods to follow sequence of invocation better.
        • Changed some visibility modifiers either to restrict further or to be more consistent.
        • Made FacetProcessor abstract.
        • FacetProcessor.getResponse was implemented as a trivial getter the same way by all subclasses, so I moved it down to a shared definition.
        • Added some generics hints
        • Removed some explicit auto-boxing
        • Added a modicum of class javadocs
        Show
        dsmiley David Smiley added a comment - Here's the patch. I added "By" as in "FacetFieldProcessorByArray" to avoid making it looking like these things are arrays or hash tables. Reordered some methods to follow sequence of invocation better. Changed some visibility modifiers either to restrict further or to be more consistent. Made FacetProcessor abstract. FacetProcessor.getResponse was implemented as a trivial getter the same way by all subclasses, so I moved it down to a shared definition. Added some generics hints Removed some explicit auto-boxing Added a modicum of class javadocs
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit dd927dba2aa8d5527314c9e0a13ef1e0a2dd2c7f in lucene-solr's branch refs/heads/branch_6x from David Smiley
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=dd927db ]

        SOLR-9404: Refactor move/renames in JSON FacetProcessor and FacetFieldProcessor.
        (cherry picked from commit 7072458)

        Show
        jira-bot ASF subversion and git services added a comment - Commit dd927dba2aa8d5527314c9e0a13ef1e0a2dd2c7f in lucene-solr's branch refs/heads/branch_6x from David Smiley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=dd927db ] SOLR-9404 : Refactor move/renames in JSON FacetProcessor and FacetFieldProcessor. (cherry picked from commit 7072458)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 7072458ea44be181195882fd366ce6a545af55df in lucene-solr's branch refs/heads/master from David Smiley
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7072458 ]

        SOLR-9404: Refactor move/renames in JSON FacetProcessor and FacetFieldProcessor.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 7072458ea44be181195882fd366ce6a545af55df in lucene-solr's branch refs/heads/master from David Smiley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7072458 ] SOLR-9404 : Refactor move/renames in JSON FacetProcessor and FacetFieldProcessor.
        Hide
        mikemccand Michael McCandless added a comment -

        Bulk close resolved issues after 6.2.0 release.

        Show
        mikemccand Michael McCandless added a comment - Bulk close resolved issues after 6.2.0 release.

          People

          • Assignee:
            dsmiley David Smiley
            Reporter:
            dsmiley David Smiley
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development