Hey Guys, I just finished up using Lucene in my application. I have data in a database , so while indexing I extract this data from the database and pump it into the index. Specifically , I have the following data in the index:
<itemID> <tags> <title> <summary> <contents> where itemID is just a number (primary key in the DB) tags : text titie: text summary: text contents: Huge text (text extracted from files: pdfs, docs etc). Now while running a search query I realized that the response time increases in a linear fashion as the number of <itemID> increase in the DB. If I have 50 items, its 8 seconds 100 items, its 17 seconds. 300+ items, its 60 seconds and maybe more. In a perfect world, I'd like to search on 300+ items within 10-15 seconds. Can anyone give me tips to fine tune lucene ? Heres a code snippet: sql query = "SELECT itemID from items where creator = 'askar' ; --execute query-- while(rs.next()){ score = doTagSearch(askar,text,itemID); scoreTitle = doTitleSearch(askar,text,itemID); scoreSummary = doSummarySearch(askar,text,itemID); ---- } So this code asks Lucene to search for the "text" in the itemID passed. itemID is already indexed. The while loop will run 300 times if there are 300 items....that gets slow...what can I do here ?? thanks for the replies, AZ