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

o.a.s.search.facet classes not public/extendable

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.1
    • Fix Version/s: 8.8
    • Component/s: Facet Module
    • Labels:
      None

      Description

      It is not easy to create a custom JSON facet function. A simple function based on AvgAgg quickly results in the following compilation failures:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project openindex-solr: Compilation failure: Compilation failure:
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[22,36] org.apache.solr.search.facet.FacetContext is not public in org.apache.solr.search.facet; cannot be accessed from outside package
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[23,36] org.apache.solr.search.facet.FacetDoubleMerger is not public in org.apache.solr.search.facet; cannot be accessed from outside package
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[40,32] cannot find symbol
      [ERROR] symbol:   class FacetContext
      [ERROR] location: class i.o.s.search.facet.CustomAvgAgg
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[49,39] cannot find symbol
      [ERROR] symbol:   class FacetDoubleMerger
      [ERROR] location: class i.o.s.search.facet.CustomAvgAgg
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[54,43] cannot find symbol
      [ERROR] symbol:   class Context
      [ERROR] location: class i.o.s.search.facet.CustomAvgAgg.Merger
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[41,16] cannot find symbol
      [ERROR] symbol:   class AvgSlotAcc
      [ERROR] location: class i.o.s.search.facet.CustomAvgAgg
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[46,12] incompatible types: i.o.s.search.facet.CustomAvgAgg.Merger cannot be converted to org.apache.solr.search.facet.FacetMerger
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[53,5] method does not override or implement a method from a supertype
      [ERROR] /home/markus/projects/openindex/solr/trunk/src/main/java/i.o.s.search/facet/CustomAvgAgg.java:[60,5] method does not override or implement a method from a supertype
      

      It seems lots of classes are tucked away in FacetModule, which we can't reach from outside.

      Originates from this thread: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201602.mbox/%3CCAB_8Yd9LdbG_0ZXM_h1igKfM6bqEypd5iLyy7TTY8CzTSCVwoA@mail.gmail.com%3E ( also available at https://lists.apache.org/thread.html/9fddcad3136ec908ce1c57881f8d3069e5d153f08b71f80f3e18d995%401455019826%40%3Csolr-user.lucene.apache.org%3E )

        Attachments

        1. SOLR-8673.patch
          8 kB
          Tim Owen
        2. SOLR-8673.patch
          12 kB
          Tim Owen

          Activity

            People

            • Assignee:
              mkhl Mikhail Khludnev
              Reporter:
              markus17 Markus Jelsma
            • Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m