Hi I even tried like this . But I'm not getting any benfifts. How to use Expert Search can you assist ?
File indexFile = new File(fileName); FSDirectory dir = FSDirectory.getDirectory(indexFile); indexSearcher =new IndexSearcher(dir); int i =0; while (i < 10) { long startime = System.currentMilliTimes(); hits = indexSearcher.search(query); long endTime= System.currentMilliTimes(); print ("TOTAL TIME TAKE : " + (endTime-startTime)); } Bharath On 6/28/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
: 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 = indexSearcher.search(query); 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. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- ~B