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

Add convenience method to ModifiableSolrParams

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.6
    • Component/s: SolrJ
    • Labels:
      None

      Description

      Add a static convenience method ModifiableSolrParams#of(SolrParams) which returns the same instance if it already is modifiable, otherwise creates a new ModifiableSolrParams instance.

      Rationale: when writing custom SearchComponents, we find that we often need to ensure that the SolrParams are modifiable. The copy constructor of ModifiableSolrParams always creates a copy, even if the SolrParms already are modifiable.

      Alternatives: The method could also be added as a convenience method in SolrParams itself, which already has static helper methods for wrapDefaults and wrapAppended.

        Attachments

        1. SOLR-9184.patch
          3 kB
          Jörg Rathlev
        2. SOLR-9184.patch
          3 kB
          Jörg Rathlev

          Activity

            People

            • Assignee:
              koji Koji Sekiguchi
              Reporter:
              joergr Jörg Rathlev
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: