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

Some refactoring to SolrIndexSearcher

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 6.0
    • search
    • None

    Description

      While reviewing SolrIndexSearcher, I started to correct a thing here and there, and eventually it led to these changes:

      • Moving QueryCommand and QueryResult to their own classes.
      • Moving FilterImpl into a private static class (was package-private and defined in the same .java file, but separate class).
      • Some code formatting, imports organizing and minor log changes.
      • Removed fieldNames (handled the TODO in the code)
      • Got rid of usage of deprecated classes such as LegacyNumericUtils and Legacy-*-Field.

      I wish we'd cut down the size of this file much more (it's 2500 lines now), but I've decided to stop here so that the patch is manageable. I would like to explore further refactorings afterwards, e.g. extracting cache management code to an outer class (but keep SolrIndexSearcher's API the same, if possible).

      If you have additional ideas of more cleanups / simplifications, I'd be glad to do them.

      Attachments

        1. SOLR-8475.patch
          157 kB
          Shai Erera
        2. SOLR-8475.patch
          158 kB
          Shai Erera
        3. SOLR-8475.patch
          169 kB
          Anshum Gupta
        4. SOLR-8475.patch
          163 kB
          Shai Erera
        5. SOLR-8475.patch
          163 kB
          Shai Erera
        6. SOLR-8475.patch
          163 kB
          Shai Erera
        7. SOLR-8475.patch
          163 kB
          Shai Erera

        Activity

          People

            shaie Shai Erera
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: