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

Remove/refactor "ApiSupport" interface? (for V2 API)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 9.0
    • None
    • v2 API
    • None

    Description

      ApiSupport.java is an interface relating to the V2 API that is implemented by all request handlers, both those at a core level and others. It's essentially this: (comments removed)

      public interface ApiSupport {
        Collection<Api> getApis();
        default Boolean registerV1() { return Boolean.TRUE; }
        default Boolean registerV2() { return Boolean.FALSE; }
      }
      

      Firstly, let's always assume that the handler will always be registered in V2. All implementations I've seen explicitly return true here; maybe I'm missing something though.

      Secondly, getApis() seems problematic for the ability to lazily load request handlers. Can we assume, at least for core level request handlers, that there is exactly one API and where necessary rely on the "spec" JSON definition – see org.apache.solr.api.ApiBag#registerLazy ?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: