lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: DefaultIndexAccessor
Date Wed, 06 Feb 2008 12:58:16 GMT
Thanks for the feedback jay. One at a time:

Jay wrote:
> Great effort for much improved indexaccessor, Mark!
> A couple questions and observations:
>
> 1. In release(Searcher), you removed a check if the given searcher is 
> the cached one from an earlier version. This could potentially  cause 
> problems for some people.
This is something that I meant to come back to. The problem is that the 
Searcher you are returning may have already been replaced in the 
Searcher cache...so retired searchers must be checked too. Will consider 
again.
> 2. The createdSearchers variable is not really used: you just populate 
> it and print it out. What's the purpose for it?
This was a debug check that I had been using. Will cleanup.
> 3. The variable numSearchersForRetirment is  used in 
> WarmingIndexAccessor not DefaultIndexAccessor.
Thanks. Will move.
> 4. I wish that in the next release of Lucene, they will add searcher 
> reopen api so that we do not have to wor around it.
Not sure how this would play out, but an interesting thought...
> 5. Although currently IndexSearcher.close() does almost nothing except 
> to close the internal index reader, it might be a safer to close 
> searcher itself as well in closeCachedSearcher(), just in case, the 
> searcher may have other resources to release in the future version of 
> Lucene.
The problem is that because I am supplying the reader, calling 
Searcher.close() won't close it. The Searcher has to be created without 
a supplied Reader for it to be able to close itself. I got the same itch 
though...
>
> Thanks!
>
> Jay
I appreciate the feedback! I'll be working more on this. I think more 
can be done.

- Mark

---------------------------------------------------------------------
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