[
https://issues.apache.org/jira/browse/LUCENE-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985403#action_12985403
]
Robert Muir commented on LUCENE-2236:
-------------------------------------
Hi Doron, thanks for the cleanups here!
bq. Would it be cleaner to have a new class DefaultSimilarityProvider which
would return DefaultSimilarity? not sure, but thought it's worth mentioning.
I went back and forth on this one... it could go either way? But since the
default does the same thing for every field, I thought
it made sense... what do you think? We could always revisit it too later, if we
later prefer these to be separate.
{quote}
javadoc in line 78:
"In general, this should not be used."
Is that so? I would like to believe that in general the default is pretty good.
{quote}
In this case, I should have been more verbose... what I meant here is that 'in
general, code should not call this static method, instead it should
respect the SimilarityProvider set on IndexSearcher
[getSimilarityProvider()]...'. This is just the default exposed for internal
purposes: just to
have a single immutable default instance for MemoryIndex, InstantiatedIndex,
IndexWriterConfig, IndexSearcher... but if someone writes
a custom Query for example, they should be using
IndexSearcher.getSimilarityProvider(), and not this static.
I can update the javadocs to be a little bit more verbose for this method, as I
would like to discourage its use... its essentially just like
using Similarity.getDefault() before, which I tried to cleanup across lucene.
> 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
> Fix For: 4.0
>
> Attachments: LUCENE-2236.patch, LUCENE-2236.patch, LUCENE-2236.patch,
> 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]