[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12777864#action_12777864 ] Michael McCandless commented on LUCENE-1558: bq. Personally, I'm not so sure its a bad idea making the user specify as it is now The thing is, I expect the vast majority of users use readOnly=true, and to those users they would be baffled that IndexReader even has a readOnly=false possibility. Simple things should be simple. Also, the exception that's thrown if you attempt a write operation against a readOnly reader is pretty darned clear about what's gone wrong: throw new UnsupportedOperationException(This IndexReader cannot make any changes to the index (it was opened with readOnly = true)); (We can reword it to say something like You must open the IndexReader with readOnly=false to make changes or some such). In other cases, I would agree we should force sneaky parameters to be explicit on construction, so users think about the choice. EG we did this with maxFieldLength to IndexWriter, because in that case the truncation was silent, actually resulted in losing indexed content, and we saw from our user's that it tripped people up far too often. But I don't think this case fits that same pattern... Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org
[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12778005#action_12778005 ] Uwe Schindler commented on LUCENE-1558: --- I am +/- 0 for adding these defaults to the ctors. Mike, do you have a patch? I think IndexSearcher.ctor and IndexReader.open() are the only affected code parts. Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org
[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12777162#action_12777162 ] Mark Miller commented on LUCENE-1558: - Ah - didn't see this issue and assumed Uwe's change was what we were going with so I updated the javadoc to reflect. If we change again, it will need another tweak (adding back that its the current default). Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org
[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12762000#action_12762000 ] Uwe Schindler commented on LUCENE-1558: --- We have deprecated all these methods and I removed them yesterday. Do you want to put them back again? Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org
[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12762009#action_12762009 ] Michael McCandless commented on LUCENE-1558: bq. Do you want to put them back again? I think we should? Ie, readOnly=true is the natural default for creating an IndexReader? Seems silly to force people to specify true/false when they create an IndexReader. But maybe wait until we reach closure on the config/builder discussion on java-dev? Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org
[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12762011#action_12762011 ] Uwe Schindler commented on LUCENE-1558: --- Kr, I rewrote all tests to add this parameter :( Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org
[jira] Commented: (LUCENE-1558) Make IndexReader/Searcher ctors readOnly=true by default
[ https://issues.apache.org/jira/browse/LUCENE-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12762014#action_12762014 ] Michael McCandless commented on LUCENE-1558: But, the tests can keep that change (being explicit about read-only). Make IndexReader/Searcher ctors readOnly=true by default Key: LUCENE-1558 URL: https://issues.apache.org/jira/browse/LUCENE-1558 Project: Lucene - Java Issue Type: Improvement Affects Versions: 2.4.1 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 3.0 Another change the defaults in 3.0. Right now you get a read/write reader from IndexReader.open and new IndexSearcher(...), and reserving the right to write causes thread contention (on isDeleted). In 3.0 let's make readOnly reader the default, but still allow opening a read/write IndexReader. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org