You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christine Poerschke (JIRA)" <ji...@apache.org> on 2018/12/07 22:19:00 UTC

[jira] [Commented] (SOLR-13049) make contrib/ltr Feature.defaultValue configurable

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

Christine Poerschke commented on SOLR-13049:
--------------------------------------------

{quote}... small issue with defaultValue ... impossible to set it from feature.json ...
{quote}
That's a good find, thank you [~slivotov]! And quite an interesting code change actually, because if a {{defaultValue}} was configured then it (of course) needs to be persisted but if no default value was configured then it might be confusing to include the default default value in the parameters map.

Attached patch started off with parts of your Dec 4th SOLR-12697 patch and then combined the three {{String/Double/Float Feature.setDefaultValue}} accessors into one {{setDefaultValue(Object)}} accessor which is similar to the {{ValueFeature.setValue(Object)}} accessor. I've then also included the default value in the {{paramsToMap()}} implementation of all features and added tests to check that parameters are correctly included in the parameter map. What do you think?

Potential next steps:
 * The patch in its current form includes no javadoc or documentation changes; i'm unsure on if/how best to document the default value feature parameter.
 * The patch started off with only parts of your Dec 4th SOLR-12697 patch; i think it would be okay to combine the two patches without issues but i have not yet tried to do so.

> make contrib/ltr Feature.defaultValue configurable
> --------------------------------------------------
>
>                 Key: SOLR-13049
>                 URL: https://issues.apache.org/jira/browse/SOLR-13049
>             Project: Solr
>          Issue Type: New Feature
>          Components: contrib - LTR
>            Reporter: Stanislav Livotov
>            Priority: Major
>         Attachments: SOLR-13049.patch
>
>
> [~slivotov] wrote in SOLR-12697:
> {quote}
> I had also done a couple of additional code changes:
> 1. fixed small issue with defaultValue(previously it was impossible to set it from feature.json, and the tests were written where Feature was created manually, and not by parsing json). Tests are added which are validating defaultValue from schema field configuration and from a feature default value.
> {quote}
> (Please see https://issues.apache.org/jira/browse/SOLR-12697?focusedCommentId=16708618&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16708618 for more context.)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org