lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khawaja Shams" <kssh...@gmail.com>
Subject Re: Closing Index Reader
Date Wed, 15 Oct 2008 17:29:17 GMT
Hello,   Thank you for your ideas. While these look promising, it seems like
there are many places within Lucene's codebase that are invoking the incRef
and decRef methods.  Upon a shallow analysis of the code, it seems like I
can call close, and the doClose method does not get called until refCount is
0.  Can anyone correct or confirm my assumption that you can call close and
any query in progress as you call close will succeed because the reader
won't be closed until the refCount is 0.  Thanks again!

On Wed, Oct 15, 2008 at 3:10 AM, Michael McCandless <
lucene@mikemccandless.com> wrote:

>
> As of 2.4.0 they are public.
>
> Mike
>
>
> Ganesh wrote:
>
>  incRef/decRef  methods are protected. Is there any other way to use these
>> methods without extending it?
>>
>> Regards
>> Ganesh
>>
>> ----- Original Message ----- From: "Michael McCandless" <
>> lucene@mikemccandless.com>
>> To: <java-user@lucene.apache.org>
>> Sent: Wednesday, October 15, 2008 2:31 PM
>> Subject: Re: Closing Index Reader
>>
>>
>>
>>> Ganesh wrote:
>>>
>>>  Yes. Once the Indexreader is closed, you should not do make any  calls
>>>> with that object.
>>>> Extend the IndexReader to add support for reference count. Close the
>>>> reader once the count is zero.
>>>>
>>>
>>> Actually you can just use the [expert] incRef/decRef methods on
>>> IndexReader to track in-flight searches still using it.  You shouldn't have
>>> to extend it.
>>>
>>> Mike
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>> Send instant messages to your online friends
>> http://in.messenger.yahoo.com
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message