--- sites/all/modules/luceneapi/luceneapi.module	2010-02-27 01:44:01.000000000 +0700
+++ sites/all/modules/luceneapi/luceneapi.module.new	2010-07-12 14:42:04.000000000 +0700
@@ -1564,7 +1564,7 @@ function luceneapi_find(LuceneAPI_Search
 
   // caches data if caching is enabled and number of results are below threshold
   $threshold = luceneapi_variable_get($module, 'cache_threshold');
-  if ($caching_enabled && !$results_cached && $threshold && count($hits) <= $threshold) {
+  if ($caching_enabled && !$results_cached && ($threshold == 0 || count($hits) <= $threshold)) {
     if ($max_cached = luceneapi_variable_get($module, 'number_cached')) {
       $hits = array_slice($hits, 0, $max_cached);
     }
