Re: Semantics of a closed IndexInput

2006-04-04 Thread Doug Cutting
Grant Ingersoll wrote: So, I will take out this test and mark in the javadocs that accessing a field after the reader has been closed is undefined. Does that seem reasonable? Yes, that sounds good to me. Thanks, Doug - To

Re: Semantics of a closed IndexInput

2006-04-04 Thread Grant Ingersoll
So, I will take out this test and mark in the javadocs that accessing a field after the reader has been closed is undefined. Does that seem reasonable? Doug Cutting wrote: Grant Ingersoll wrote: try { value = field.stringValue(); assertTrue("Should not be able to read value: " +

Re: Semantics of a closed IndexInput

2006-04-04 Thread Doug Cutting
Grant Ingersoll wrote: try { value = field.stringValue(); assertTrue("Should not be able to read value: " + value + " since the reader is closed", false); } catch (Exception e) { } [ ... ] This test fails, and I don't think it should. The assert in the try block is ac

Re: Semantics of a closed IndexInput

2006-04-04 Thread Grant Ingersoll
Grant Ingersoll wrote: OK. They should not be used, but we have no way of determining if a IndexInput is actually closed, right? At least Lucene does not track it. I run into this issue with Lazy Loading. I can still access the value of a lazy field after the fieldsStream IndexInput is cl

Re: Semantics of a closed IndexInput

2006-04-04 Thread Grant Ingersoll
OK. They should not be used, but we have no way of determining if a IndexInput is actually closed, right? At least Lucene does not track it. I run into this issue with Lazy Loading. I can still access the value of a lazy field after the fieldsStream IndexInput is closed _if_ I have not made

Re: Semantics of a closed IndexInput

2006-04-03 Thread Doug Cutting
Grant Ingersoll wrote: Should it be the case that you can clone a closed IndexInput and get a valid object that is capable of reading? B/c this is what I am seeing in my Lazy implementation (note, it seems to work fine...) I am just not sure if it should work or if it is a bug. Cloned Index

Semantics of a closed IndexInput

2006-04-03 Thread Grant Ingersoll
Should it be the case that you can clone a closed IndexInput and get a valid object that is capable of reading? B/c this is what I am seeing in my Lazy implementation (note, it seems to work fine...) I am just not sure if it should work or if it is a bug. Also, would it be useful to have a i