This is to all who gave me tips on my search optimization problems: Thank you :)
I managed to, with just a simple optimization, not storing a field I didn't need, and a change in the cycle (not using topdocs), reduce to a tenth (!!!) the time of search. Here are some very preliminary results, made on two indexes: A) Old configuration (except this one was optimized), 10.000 documents indexed: Initializing VM machine Setting variables Searching for: gene OR dna OR protein OR patient OR disease OR metabolism OR pathway OR chromossome OR human OR mouse OR biochemical OR lipid OR glucose OR diabetes OR science OR health 4397 0:00:09.094805 ----- Right afterwards (with supposedly the results in cache) ------------ Initializing VM machine Setting variables Searching for: gene OR dna OR protein OR patient OR disease OR metabolism OR pathway OR chromossome OR human OR mouse OR biochemical OR lipid OR glucose OR diabetes OR science OR health 4397 0:00:00.563862 B) New Configuration, with the same documents indexed: Initializing VM machine Setting variables Searching for: gene OR dna OR protein OR patient OR disease OR metabolism OR pathway OR chromossome OR human OR mouse OR biochemical OR lipid OR glucose OR diabetes OR science OR health 4397 0:00:00.352372 ---- Right after the first one (with supposedly cache results) ----- Initializing VM machine Setting variables Searching for: gene OR dna OR protein OR patient OR disease OR metabolism OR pathway OR chromossome OR human OR mouse OR biochemical OR lipid OR glucose OR diabetes OR science OR health 4397 0:00:00.351742 ------------------------------------- Now I have a question. Shouldn't the second search, with the cached results, be significantly faster? If not, why is it on the config A and not on B? Again, thanks quite a lot for all the comments. I'll still try the other things you've said but at least for now, this'll shut my colleagues that advised me to drop Lucene ;) Cheers everyone!
