[
https://issues.apache.org/jira/browse/LUCENE-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982623#action_12982623
]
Doron Cohen commented on LUCENE-2236:
-------------------------------------
I like this flexibility - allowing different scoring parameters for different
fields.
Wondering though - would it be nicer to keep original name *Similarity* and
just change the way it is created and used to be field specific...?
For this, should deprecate Similarity methods taking a field/name param and
introduce new ones without it - hmm.. the class would then have 3 deprecated
methods:
* scorePayload()
* lengthNorm() (which anyway is already deprecated)
* computeNorm()
Is that too bad?
For FieldSimilarity (and for the new method in Similarity if deciding to keep
that name after all) can we get rid of the first parameter fieldName from
computeNorm() and scorePayload(), or are they used in a way I am missing even
when one knows that the similarity is for certain (or all) field?
In the new class FS (if kept) I think the deprecated lengthNorm() can be
removed?
Also, since Similarity (or FS) is becoming field aware, perhaps add a method
*getFieldName()* - it can return null or ANY in case there is no dedicated
similarity for that field... Hmm... If the logic employed is this "For fields
F1, F2 return Sim1, for F3, F4 return Sim2, for all other fields return Sim3,
then it is less simple, still, the similarity provider called with a field name
can pass it to the Similarity object created and that in turn would be able to
return it... just thinking out loud here... should Sim be aware of for which
field it was created, so that no need to pass it as parameter in its methods in
case this is ever important?
> Similarity can only be set per index, but I may want to adjust scoring
> behaviour at a field level
> -------------------------------------------------------------------------------------------------
>
> Key: LUCENE-2236
> URL: https://issues.apache.org/jira/browse/LUCENE-2236
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Query/Scoring
> Affects Versions: 3.0
> Reporter: Paul taylor
> Assignee: Robert Muir
> Attachments: LUCENE-2236.patch
>
>
> Similarity can only be set per index, but I may want to adjust scoring
> behaviour at a field level, to faciliate this could we pass make field name
> available to all score methods.
> Currently it is only passed to some such as lengthNorm() but not others such
> as tf()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]