lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bamford <Chris.Bamf...@scalix.com>
Subject RE: New "Stream closed" exception with Java 6 - solved
Date Fri, 18 Sep 2009 16:43:18 GMT
Hoss,

> not really ... adding a document multiple times is a perfectly legal use 
> case, adding a document with a "Reader" based field where the reader is 
> already closed ... that's not legal (And Lucene doesn't really have any 
> way of knowing if the Reader is closed because *it* closed it.
>
Now I am confused, I must be missing something fundamental.  I take no action that I am aware
of which closes the Reader, so how is it happening?  The attached code demonstrates the exception
- please can you advise on what is happening under the covers?  :-)  

Thanks again,

- Chris


----- Original Message -----
From: Chris Hostetter <hossman_lucene@fucit.org>
Sent: Thu, 17/9/2009 7:38pm
To: java-user@lucene.apache.org
Subject: RE: New "Stream closed" exception with Java 6 - solved


: It turns out that the cause of the exceptions is in fact adding an item 
: twice - so you were correct right at the start :-)  I ran a test where I 

glad to see it all worked out.

: Just a minor point: isn't Lucence in a position to detect the duplicate 
: insertion attempt and flag it with something less vague than "Stream 
: closed"?  :-)

not really ... adding a document multiple times is a perfectly legal use 
case, adding a document with a "Reader" based field where the reader is 
already closed ... that's not legal (And Lucene doesn't really have any 
way of knowing if the Reader is closed because *it* closed it.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org



Mime
View raw message