Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-11617 #310

Closed
wants to merge 5 commits into from
Closed

SOLR-11617 #310

wants to merge 5 commits into from

Conversation

fsparv
Copy link

@fsparv fsparv commented Jan 24, 2018

Changes as mentioned in Jira comment, plus rather than decide I provided an option for the user to enable whitespace values. By default this is off and whitespace values are treated as null, but if the user really wants to set a value to 3 spaces they can by passing allowWhitespaceValues=true. I'm fairly set against pure whitespace keys unless someone can supply up with a good reason for that.

@dsmiley
Copy link
Contributor

dsmiley commented Jan 25, 2018

Nice docs. Lets not provide an option to configure whitespace/trim handling -- configuration-itis. IMO we should be consistent with other parts of Solr on what to do (e.g. props on core creation) but you seem to feel strongly about it so whatever. It's not that I don't disagree with your point of view, it's only that I think consistency is a higher virtue.

Can you add a test please? It could be a simple modification to an existing test.

public static class ModifyAlias extends AsyncCollectionAdminRequest {

private final String aliasName;
private static Map<String,String> metadata = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously "static" is a mistake here; I'll fix it.

public SolrParams getParams() {
ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
params.set(CoreAdminParams.NAME, aliasName);
metadata.keySet().forEach(key -> params.set("metadata." + key, metadata.get(key)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better:

metadata.forEach((key, value) ->  params.set("metadata." + key, value));

I'll do it.

@ctargett
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-11617 was released in Solr 7.3, so this PR can be closed.

@ctargett ctargett closed this Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants