[ 
https://issues.apache.org/jira/browse/SOLR-244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-244:
-------------------------------

    Attachment: SOLR-244-ModifiableSolrParams.patch

This includes a new class (with tests) and augments MultiMapSolrParams with 
set() and add()

Only one of the changes should be included -- unless there is a good reason 
*not* to augment MultiMapSolrParams, I think that is a better solution.

I know all of this is possible with the existing interface, but I prefer:

    MultiMapSolrParams params = new MultiMapSolrParams();
    params.add( "name", "value1" );
    ...
    params.set( "name", "value2", "value3" );

to:

    Map<String,String[]> map = new HashMap<String, String[]>(); 
    MultiMapSolrParams params = new MultiMapSolrParams( map );
    MultiMapSolrParams.addParam( "name", "value1", map );
    ...
    map.put( "name", new String[] { "value2", "value3" } );





> ModifiableSolrParams -- (perhaps) modify MultiMapSolrParams
> -----------------------------------------------------------
>
>                 Key: SOLR-244
>                 URL: https://issues.apache.org/jira/browse/SOLR-244
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Priority: Minor
>         Attachments: SOLR-244-ModifiableSolrParams.patch
>
>
> The existing ways to change parameters at runtime are awkward, this is a 
> class I have been using in SOLR-20.  It is a solr params implementation with 
> two nice additions:
>   public void set( String name, String ... val ) {
>    ... 
>   }
>   public void add( String name, String ... val ) {
>   ...
>   }
> Rather then have a new class, it may be better to augment MultiMapSolrParams 
> to include a default constructor and use set/add to modify the final 
> Map<String,String[]>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to