[
https://issues.apache.org/jira/browse/LUCENE-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979164#action_12979164
]
Robert Muir commented on LUCENE-1260:
-------------------------------------
bq. Is there no way to remove this stupid static default and deprecate
Similarity.(g|s)etDefault()? Can we not use the Similarity from IndexWriter for
the case of NormsWriter?
I think this is totally what we should try to do in trunk, especially after
LUCENE-2846.
In this case, i want to fix the issue in a backwards-compatible way for lucene
3.x
The warning is a little crazy I know, really people shouldnt rely upon their
encoder being used for *fake norms*.
But i think its fair to document the corner case, just because its not really
fixable easily in 3.x
For trunk, here is what i suggest:
* LUCENE-2846: remove all uses of fake norms. We never fill fake norms anymore
at all, once we fix this issue. If you have a non-atomic reader with two
segments, and one has no norms, then the whole norms[] should be null. this is
consistent with omitTF. So, for example MultiNorms would never create fake
norms.
* LUCENE-2854: Mike is working on some issues i think where BooleanQuery uses
this static or some other silliness with Similarity, i think we can clean that
up there.
* finally at this point, I would like to remove
Similarity.getDefault/setDefault alltogether. I would prefer instead that
IndexSearcher has a single 'DefaultSimilarity' that is the default value if you
don't provide one, and likewise with IndexWriterConfig.
> Norm codec strategy in Similarity
> ---------------------------------
>
> Key: LUCENE-1260
> URL: https://issues.apache.org/jira/browse/LUCENE-1260
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Affects Versions: 2.3.1
> Reporter: Karl Wettin
> Assignee: Michael McCandless
> Fix For: 4.0
>
> Attachments: Lucene-1260-1.patch, Lucene-1260-2.patch,
> Lucene-1260.patch, LUCENE-1260.txt, LUCENE-1260.txt, LUCENE-1260.txt,
> LUCENE-1260_defaultsim.patch
>
>
> The static span and resolution of the 8 bit norms codec might not fit with
> all applications.
> My use case requires that 100f-250f is discretized in 60 bags instead of the
> default.. 10?
--
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]