lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Luke faster + Index Searcher is slow
Date Thu, 28 Jun 2007 18:23:54 GMT

: Are you opening the IndexSearcher every time you query?  This is a
: costly operation.

just repeating the above line because it's important.  also...

: > The code i use is
: >                   File indexFile = new File(fileName);
: >                    FSDirectory dir = FSDirectory.getDirectory
: > (indexFile);
: >                    indexSearcher =new IndexSearcher(dir);
: >                   hits =;

are those the only lines you are timing?  are you timing all of your uses
of the hits obejct as well? what are you doing with the hits object?

the Hits class itself is not efficient if you iterate very deep in your
results ... i haven't looked at the internals of Luke, but i would be very
suprised if it was using the Hits class ... if you are really worried
about performacne, use one of the other (Expert) search methods.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message