Paul J. Lucas wrote:
On May 29, 2008, at 5:18 PM, Mark Miller wrote:
It looks to me like you are not sharing an IndexSearcher across threads.
My reading of the documentation says that doing so is an optimization
only and not a requirement.
Are you saying that using multiple IndexSearchers will definitely
cause the problem I am experiencing and so the suggestion that using a
single IndexSearcher for optimaztion only is wrong?
Will it definitely cause your problem? I wouldn't say that. But it
could. Also, yes I would say its wrong that you should only do it as an
optimization - unless you really know what you are doing. Constructing a
Searcher is slow (actually the underlying Reader), and so you don't want
to do it every time someone searches...it will really slow you down.
Also, if you get a ton of concurrent searches, you will have an
IndexReader open for each...not only is this very wasteful in terms of
RAM and time, but as your IndexWriter merges you can have all kinds of
momentary references to normally unneeded index files...get enough of
this going on, and even with the compound file format you can get too
many files open and files missing FileNotFound exceptions.
You really should, or use a small pool of them (depending on
speed/ram/load)
If performance isn't an issue, why do I need to?
Because its the right thing to do :)
The only time I usually see this error, I also see too many files
open first. Are you sure you don't have another exception as well?
Yes I'm sure there is no other exception.
Ok...normally I recall them going together but that may not always be
the case. Basically, I can't guarantee you this is your problem...but I
do know its very possible. Some others on the list may have other ideas too.
- Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]