lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksander M. Stensby" <aleksander.sten...@integrasco.no>
Subject Re: IndexSearcher in Servlet
Date Wed, 28 Jun 2006 11:14:54 GMT
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  
<heritrix.lucene@gmail.com> wrote:

> Is there any difference in terms of speed between IndexReader and
> IndexSearcher??
>
>
>
> On 6/27/06, Erik Hatcher <erik@ehatchersolutions.com> 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: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>



-- 
Aleksander M. Stensby
Software Developer
Integrasco A/S
aleksander.stensby@integrasco.no
Tlf.: +47 41 22 82 72

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