[
https://issues.apache.org/jira/browse/SOLR-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482686
]
J.J. Larrea commented on SOLR-183:
----------------------------------
Thanks for clarifying the semantics and the implementation, Ryan.
It's fine by me to remove the "strictField" logic from getFieldParam; as I
said, I wasn't sure there would be any cases where a developer considered
defining a non-field-limited value (facet.limit) an insufficient means to
fulfill definition of a field-specific value (f.xxx.facet.limit). Should such
a case ever arise, they could subclass RequiredSolrParams to override
getFieldParam and accomplish that themself.
> add getRequiredParameter() to SolrParams
> ----------------------------------------
>
> Key: SOLR-183
> URL: https://issues.apache.org/jira/browse/SOLR-183
> Project: Solr
> Issue Type: Wish
> Reporter: Ryan McKinley
> Priority: Trivial
> Attachments: RequiredSolrParams.java, SOLR-183-required-param.patch,
> SOLR-183-required-param.patch, SOLR-183-required-param.patch,
> SOLR-183-required-param.patch, SOLR-183-required-param.patch
>
>
> I find myself including this with every patch, so i'll just separate it out.
> This simply adds a utilty function to SolrParams that throws a 400 if the
> parameter is missing:
> /** returns the value of the param, or throws a 400 exception if missing */
> public String getRequiredParameter(String param) throws SolrException {
> String val = get(param);
> if( val == null ) {
> throw new SolrException( 400, "Missing parameter: "+param );
> }
> return val;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.