On 09/04/2015 16:53, Bruno Albuquerque wrote:
In more general terms then, are there any techniques to speed up searches
in general? Right now i am using a IndexSearcher's Hits() method to do a
search in a free form text query. I am mostly interested in reducing the
cost of the initial queries as .5 seconds is just too slow (some queries
took up to 3 seconds the first time. Admittedly I am not using a very fast
machine for these tests).

You could try a utility like vmtouch that loads files from disk into the operating system's file system cache:

    http://hoytech.com/vmtouch/vmtouch.html

The following command should warm the cache:

    vmtouch -t [path to Lucy index]

Besides, with 4.5 millions documents, your index is probably a couple of GB in size. Make sure that you have enough memory to fit the whole index into RAM.

Nick

Reply via email to