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

David Mark Nemeskey commented on SOLR-2754:
-------------------------------------------

Robert, I've reviewed the patch. Even though I don't have any experience with 
Solr, the code is very clear, well documented and easy to understand. I have 
the following observations (or questions, more like):

1. {{LMDirichletSimilarity}} has a mu-less constructor. Maybe we could avoid 
defining a constant in two places if we used that? E.g.
{code}
mu = params.getFloat("mu");
...

LMDirichletSimilarity sim = (mu != null) ? new LMDirichletSimilarity(mu)
                                         : new LMDirichletSimilarity();
{code}
Same goes for H3 and Z.

2. I think it is a nice feature of the new framework that the user can create 
new basic models, normalizations, distributions, etc. and just plug them in to 
{{DFRSimilarity}} or {{IBSimilarity}}. However, these factories can only handle 
those that we have defined ourselves. Wouldn't it be good if we could 
instantiate custom classes via reflection? It could work similarily as in 
Terrier: keep the current code for core models, and use reflection if the user 
specifies a (fully specified) classname.

3. I don't know the Lucene/Solr conventions for line length. There are some 
rather long lines in IB and DFR, but maybe its not a problem?

> create Solr similarity factories for new ranking algorithms
> -----------------------------------------------------------
>
>                 Key: SOLR-2754
>                 URL: https://issues.apache.org/jira/browse/SOLR-2754
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>         Attachments: SOLR-2754.patch
>
>
> To make it easy to use some of the new ranking algorithms, we should add 
> factories to solr:
> * for parametric models like LM and BM25 so that parameters can be set from 
> schema.xml
> * for framework models like DFR and IB, so that different basic 
> models/normalizations/lambdas can be chosen

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to