[
https://issues.apache.org/jira/browse/LUCENE-3606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162454#comment-13162454
]
Simon Willnauer commented on LUCENE-3606:
-----------------------------------------
bq. Thinking about this: a clean way to do it would be for Similarity to get a
new method:
I have been talking to robert about moving norms to IDV earlier and the biggest
issues we had in our discussion were when Sims have more than one value for a
document since we'd need to add custom (nested) fields or similar things
which'd be yet another mess further down the road. I think it's totally valid
to restrict to a single DV and if you need more than one you simply use a byte
variant and impl you custom decoding / encoding in your sim (that seems more
performant too IMO).
Once we moved over to this new API ie. no custom norm code anymore we can
actually make use of IDV directly, norms would be just another CFS file and
each fields norms would just be a "virtual" file in the IDV CFS. All loading
and writing could/would be done by the codecs IDV.
Yet, I think once we have this we should even go further and remove omitNorms
from the Field entirely and let the similarity decide if a field has norms or
not. This would remove a lot of hairiness in the code too. I'd really like to
see that!
> Make IndexReader really read-only in Lucene 4.0
> -----------------------------------------------
>
> Key: LUCENE-3606
> URL: https://issues.apache.org/jira/browse/LUCENE-3606
> Project: Lucene - Java
> Issue Type: Task
> Components: core/index
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
>
> As we change API completely in Lucene 4.0 we are also free to remove
> read-write access and commits from IndexReader. This code is so hairy and
> buggy (as investigated by Robert and Mike today) when you work on
> SegmentReader level but forget to flush in the DirectoryReader, so its better
> to really make IndexReaders readonly.
> Currently with IndexReader you can do things like:
> - delete/undelete Documents -> Can be done by with IndexWriter, too (using
> deleteByQuery)
> - change norms -> this is a bad idea in general, but when we remove norms at
> all and replace by DocValues this is obsolete already. Changing DocValues
> should also be done using IndexWriter in trunk (once it is ready)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]