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

refactor range faceting code so that the list of FieldTypes supported isn't hardcoded

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      idea that occured to me reviewing SOLR-2202, haven't thought it through all the way to be certain it would work...

      1) create a new marker interface "RangeFacetable" which contains a single method getRangeEndpointCalculator(SchemaField)
      2) refactor SimpleFacets so that instead of the big {{if (ft instanceof ...)

      { ... }

      else if ....}} block there right now, we just check if the FieldType is an instance of RangeFacetable
      3) use ft.getRangeEndpointCalculator to do the voodoo we curently doodoo
      4) make all of the existing private static subclasses of RangeEndpointCalculator (like IntegerRangeEndpointCalculator) public top level classes so custom FieldTypes can use them

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hossman Chris M. Hostetter
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: