don't cache count queries

This commit is contained in:
kimchy 2010-04-01 00:20:45 +03:00
parent def8caf7db
commit 2ea7423f3a
1 changed files with 2 additions and 1 deletions

View File

@ -324,7 +324,8 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
}
Query query = queryParser.parse(querySource);
// wrap it in filter, cache it, and constant score it
query = new ConstantScoreQuery(filterCache.cache(new QueryWrapperFilter(query)));
// Don't cache it, since it might be very different queries each time...
// query = new ConstantScoreQuery(filterCache.cache(new QueryWrapperFilter(query)));
query = filterByTypesIfNeeded(query, types);
Engine.Searcher searcher = engine.searcher();
try {