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

Make SolrRequest objects v2-POJO based (for /v2/collections)

    XMLWordPrintableJSON

Details

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

    Description

      Solr supports two ways for developers to setup V2 APIs. APIs are either defined in a JSON 'apispec' file, or are defined as SolrJ POJOs. The community has decided previously that the POJO approach is the one to use going forward, as it cuts down on duplication and makes parameter editing simpler. An example of the POJO-based approach can be seen in SOLR-15118.

      We could take this approach a step further by implementing our SolrJ's request objects in terms of the canonical POJOs used for serialization/deserialization. This gets us a few benefits:

      • Further removes API definition duplication. The instance variables in (e.g.) CollectionAdminRequest.Create are near duplicates of those in CreatePayload.
      • Gives us a way to continue randomizing v1 vs v2 in SolrJ, which has previously only been (easily) possible using apispec-defined APIs. (See SOLR-15141 for more details on v1-v2 randomization.)
      • Provides a forcing function to make sure v2 APIs stay up to date - if SolrRequest objects are based on the v2 serde beans, then adding support in SolrJ would require an update of the relevant serde bean.

      Doing this across SolrJ exceeds a single JIRA ticket, as many v2 APIs are currently out of date and few use the new-ish POJO-based approach. This ticket only aims to do this for the SolrRequest classes whose /v2/collections APIs were recently converted to the POJO approach in SOLR-15118:

      • Backup
      • Restore
      • CreateAlias
      • CreateTimeRoutedAlias
      • CreateCategoryRoutedAlias
      • SetAliasProperty
      • DeleteAlias
      • Create

      Attachments

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              gerlowskija Jason Gerlowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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