Mark Miller wrote:
Paul J. Lucas wrote:
Sorry for the radio silence. I changed my code around so that a
single IndexReader and IndexSearcher are shared. Since doing that,
I've not seen the problem. That being the case, I didn't pursue the
issue.
I still think there's a bug because the code I had previously, IMHO,
should have worked just fine.
- Paul
Hey Paul, when I told you that you should be sharing
IndexSearcher/Reader's across threads and I thought it was wrong not
to, I made the obviously wrong assumption that you either had lots of
clients or were not in control of the number of searches that could
could come in at once (a webpp on the internet type thing).
In your simple case, you are certainly right and it should have worked
just fine. I was concerned you were generating an unknown number of
Readers for every search (which we now know is not an issue). Please
disregard all notions that I may have introduced in regards to this
being wrong. It is only in the case of many clients/searches
simultaneously that I would consider what I said to be accurate: and
even then not everyone is sure to agree with me.
Again, I apologize for leading you a bit off track. You did double
check your Writer handling though? I still don't think anyone has seen
your error without using two Writer's simultaneously.
- Mark
P.S.
Dont switch back to not sharing! Even your one client must enjoy not
having to wait for that new Searcher to load up on every search :)
Especially if you have any sort caches.
- Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]