As far as i know, an IndexSearcher use an IndexReader.. Hence you can do
searcher.getIndexReader().. even tho you instanciated the searcher with a
string path or a directory. So, i would guess that by creating a searcher
with an indexreader as parameter, the constructor will be faster.
But, what do I know:)
On Wed, 28 Jun 2006 12:53:54 +0200, heritrix.lucene
<[EMAIL PROTECTED]> wrote:
Is there any difference in terms of speed between IndexReader and
IndexSearcher??
On 6/27/06, Erik Hatcher <[EMAIL PROTECTED]> wrote:
On Jun 27, 2006, at 10:32 AM, Fabrice Robini wrote:
> That's also my case...
> I create a new IndexSearcher at each query, but with a static and
> instanciated Directory.
>
> New IndexSearcher(myDirectory)
>
> It seems to be OK... am I wrong ?
You may be "ok" given your query patterns, but you won't benefit from
Lucene internal caching unless you use a single IndexSearcher (or
IndexReader, as just pointed out).
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Aleksander M. Stensby
Software Developer
Integrasco A/S
[EMAIL PROTECTED]
Tlf.: +47 41 22 82 72
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]