lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3606) Make IndexReader really read-only in Lucene 4.0
Date Wed, 07 Dec 2011 23:28:39 GMT

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

Uwe Schindler commented on LUCENE-3606:
---------------------------------------

I tried to fix the remaining tests today, but this seems impossible without IndexReader.deleteDocument(int
docId). Some of those tests with commented out by nocommits are so old that its impossible
to understand what they are really testing (especially TestAddIndexes and TestIndexWriterMerging).
I would simply delete them, because all this stuff is heavyily random tested otherwise (those
"old tests" have no randomization at all).

The remaining nocommits are:

{noformat}
./src/java/org/apache/lucene/index/codecs/lucene40/Lucene40NormsReader.java:      // nocommit:
change to a real check? see LUC
19
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: move the whole modification
stuff to IW
./src/java/org/apache/lucene/index/SegmentReader.java:  // end nocommit
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: is this needed anymore
by IndexWriter?
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/java/org/apache/lucene/index/SegmentReader.java:  // nocommit: remove deletions from
SR
./src/test/org/apache/lucene/index/TestAddIndexes.java:  /* nocommit: reactivate these tests
./src/test/org/apache/lucene/index/TestDeletionPolicy.java:  /* nocommit: fix this test, I
don't understand it!
./src/test/org/apache/lucene/index/TestIndexWriterMerging.java:  /* nocommit: Fix tests to
use an id and delete by term
./src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java:  /* nocommit: Fix tests
to use an id and delete by term
./src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java:  /* nocommit: Fix tests
to use an id and delete by term
./src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java:  /* nocommit: Fix tests
to use an id and delete by term
{noformat}

The parts in SegmentReader should be made TODO and a new issue should be opened, which removed
RW from SegmentReader (Mike?). The tests should be deleted as described above. Otherwise the
branch seems finalized otherwise so I would like to merge back to trunk asap.
                
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message