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

NamedList - Deprecating ctor. with heterogenous List and replacing with a type-safe variant.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.4
    • None
    • None
    • Java 6, Tomcat 6

    Description

      NamedList (org/apache/solr/common/util/NamedList ) currently has a heterogenous List (even numbered indices are String-s ) and the odd-numbered indices are the specific types. As per benchmarks ( see SOLR-912 ) - the implementation could be improved in favor of a Map.Entry<String, T> that beats in performance and ease of code maintenance.

      As per the discussion in SOLR-912 , a separate issue in JIRA is created that temporarily deprecates the List ctor. in NamedList and replaces the same with a Map.Entry<String, T> [] arg. constructor .

      This would be go in 1.4 to enable people to migrate their code for the new ctor. and move away from List<?> .

      At a later version of Solr (may be v2) - the optimal implementation would be brought back in with the List <Map.Entry<String, ?> > for better type-safety and performance.

      Attachments

        1. SOLR-967.patch
          10 kB
          Chris M. Hostetter
        2. SOLR-967.patch
          10 kB
          Karthik K

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              kaykay.unique Karthik K
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified