[ 
https://issues.apache.org/jira/browse/SOLR-8992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15252049#comment-15252049
 ] 

Steve Rowe commented on SOLR-8992:
----------------------------------

Thanks for the patch Noble.

A few things I noticed:

# Two {{SchemaProps.Handler}} enum values ({{SOLR_QUERY_PARSER}} and 
{{SIMILARITY}}) can have null lambdas (when they are not explicitly configured 
in the schema), but you don't guard against that in {{SchemaProps.toMap()}}, so 
NPEs are waiting to happen.  There are no tests for these cases but there 
should be.
# In the previous {{IndexSchema.getNamedPropertyValues()}}, {{fields}} were 
output before {{dynamicFields}}, but the way you iterate your new 
{{SchemaProps.Handler}} enum in {{SchemaProps.toMap()}}, {{DYNAMIC_FIELDS}} 
will be called before {{FIELDS}}; as a result, the way whole schema output is 
ordered will change.  I think that's bad.
# In the {{SchemaProps}} ctor there is repeated field list extraction code (for 
{{source.fl}}, {{dest.fl}} and {{fl}} params) that could be pulled out into a 
method and called from each of those places, e.g. here's the {{fl}} version:
{code:java}
String[] fields = flParam.trim().split("[,\\s]+");
if (fields.length > 0)
  requestedFields = new LinkedHashSet<>(Stream.of(fields)
    .filter(it -> !it.trim().isEmpty())
    .collect(Collectors.toList()));
{code}
# There are a couple new unused imports in {{IndexSchema.java}}: 
{{com.google.common.base.Functions}} and {{org.apache.solr.common.util.Pair}}.


> Restore Schema API GET method functionality removed by SOLR-8736
> ----------------------------------------------------------------
>
>                 Key: SOLR-8992
>                 URL: https://issues.apache.org/jira/browse/SOLR-8992
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Steve Rowe
>            Assignee: Noble Paul
>         Attachments: SOLR-8992.patch
>
>
> The following schema API GET functionality was removed under SOLR-8736; some 
> of this functionality should be restored:
> * {{schema/copyfields}}:
> ** The following information is no longer output:
> *** {{destDynamicBase}}: the matching dynamic field pattern for the 
> destination
> *** {{sourceDynamicBase}}: the matching dynamic field pattern for the source
> ** The following request parameters are no longer supported:
> *** {{dest.fl}}: include only copyFields that have one of these as a 
> destination
> *** {{source.fl}}: include only copyFields that have one of these as a source
> * {{schema/dynamicfields}}:
> ** The following request parameters are no longer supported:
> *** {{fl}}: a comma and/or space separated list of dynamic field patterns to 
> include 
> * {{schema/fields}} and {{schema/fields/_fieldname_}}:
> ** The following information is no longer output:
> *** {{dynamicBase}}: the matching dynamic field pattern, if the 
> {{includeDynamic}} param is given (see below) 
> ** The following request parameters are no longer supported:
> *** {{fl}}: (only supported without {{/_fieldname_}}): a comma and/or space 
> separated list of fields to include 
> *** {{includeDynamic}}: output the matching dynamic field pattern as 
> {{dynamicBase}}, if {{_fieldname_}}, or field(s) listed in {{fl}} param, are 
> not explicitly declared in the schema
> * {{schema/fieldtypes}} and {{schema/fieldtypes/_typename_}}:
> ** The following information is no longer output: 
> *** {{fields}}: the fields with the given field type
> *** {{dynamicFields}}: the dynamic fields with the given field type  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to