Hi, I have a collection of 500 txt documents and I implement a web application(JSP) for searching these documents. In addition, the application shows the BestFragment of each result and highlights the query terms. My application is slow enough (about 2,5-3 seconds for each query) even if I run it from my computer (It's not publiched yet). Do you suggest me something in order to improve speed? I have read that you have to keep the indexsearcher open. Is it right? and how could I do that(when I must close it)?
In Highlighting I use the following String result = highlighter.getBestFragment(tokenStream,text) text parameter must be String so I open the document and convert it to String. Of course it is time consuming. Is there a different way? Thanks in advance, -- Stelios Eliakis