[
https://issues.apache.org/jira/browse/LUCENE-3606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162235#comment-13162235
]
Uwe Schindler commented on LUCENE-3606:
---------------------------------------
As first step, I removed setNorm/doSetNorm from all IndexReaders, deleted the
NormModifier from contrib/misc and modified tests.
I am not sure, if TestBackwardsCompatibility really checks that .sXX files are
read correctly, we may need to add tests, as we no longer check the writing of
norms anymore in the standard tests. So when reading Indexes with modified
tests, we must ensure that the modified norms are read.
When changing tests I already removed tests that opened IndexReader in RW mode
(like TestBackwards), even if not only norms were modified. But as
deletions/commit will also be removed later
TestIndexReaderReopen should maybe modified to modify the Index using
IndexWriter instead of IndexReader to test reopen functionality better. I
removed the whole modifyIndex method from this test, so it is now not going
deep enough. We should maybe revert the commit on this file and change
modifyIndex to use IndexWriter.
> 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]