[ 
https://issues.apache.org/jira/browse/LUCENE-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985415#action_12985415
 ] 

Doron Cohen commented on LUCENE-2236:
-------------------------------------

Hi Robert,

{quote}
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
{quote}

Yes I was confused by this, it is really an accessor method for the constant, 
and indeed with this change it is no more possible for users to modify the 
default behavior regarding similarity JVM wide - as they can still do for e.g. 
BQ.setMaxClauseCount(). 

I read it wrongly, as if it said "in general, this setting should not remain... 
" maybe it is just me. 
I agree something as you propose like this would be probably clear on first 
reading: 
{code}
  /**
  * Expert: returns a default SimilarityProvider instance.
  * In general, this method is only called to initialize searchers and writers.
  * User code and query implementations should respect e.g.
  * {@link ..... IndexSearcher#getSimilarityProvider()}.
  * @lucene.internal
  */
{code}
or something similar (I am sure you'll write it better...:))

> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to