fixed bug in jaccard occurrence threshold computation to always return a positive (non-zero) value

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@1902 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/search/JaccardSearchModifier.java b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/search/JaccardSearchModifier.java
index 6878f48..4cf7e40 100644
--- a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/search/JaccardSearchModifier.java
+++ b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/search/JaccardSearchModifier.java
@@ -27,7 +27,7 @@
 
     @Override
     public int getOccurrenceThreshold(int numQueryTokens) {
-        return (int) Math.floor((float) numQueryTokens * jaccThresh);
+        return Math.max((int) Math.floor((float) numQueryTokens * jaccThresh), 1);
     }
 
     @Override
@@ -45,7 +45,7 @@
     public void setJaccThresh(float jaccThresh) {
         this.jaccThresh = jaccThresh;
     }
-    
+
     @Override
     public String toString() {
         return "Jaccard Search Modifier, Threshold: " + jaccThresh;