lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From subwayne <>
Subject Re: IndexSearch very slow after reopening the index
Date Thu, 14 Oct 2010 13:31:22 GMT

Ok, I read the Wiki page related to improving the searching speed and adopted
some advices. One of the slow queries is simply. Here are some:

107.0 ms
resultSet.totalHits = 1

51.0 ms
resultSet.totalHists = 1

46.0 ms
resultSet.totalHits = 1

46.0 ms
resultSet.totalHits = 1

.. and so on. I pose about one hundred queries for each category. Therefore,
I retrieve a list of documents of a category by utilizing a QueryFilter:

Term luceneTerm = new Term("plaintext", stemmer.process(candidate));
TermQuery termQuery = new TermQuery(luceneTerm);
Filter qf = new CachingWrapperFilter(new QueryWrapperFilter(termQuery));

TopDocs resultSet =, qf, Integer.MAX_VALUE);

Each subsequent query is "only" 46 ms instead of 107 ms. However, I think it
is very slow. Note that these values are taken while the Lucene index is in
the RAM (RAMDirectory). It makes no difference in time if I am using the
RAMDirectory or NFIOSDirectory.

Thanks for further advices.

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message