commit | fba23a3041d716c4fa04dbbbbc27ae0c6ff3350a | [log] [tgz] |
---|---|---|
author | zheilbron <zheilbron@123451ca-8445-de46-9d55-352943316053> | Sat Sep 15 03:18:45 2012 +0000 |
committer | zheilbron <zheilbron@123451ca-8445-de46-9d55-352943316053> | Sat Sep 15 03:18:45 2012 +0000 |
tree | d925bdb21fdc2cdf2a1ae528e6c77d003264acf5 | |
parent | a2789c49a4f8cee85ac839b9295631e3c436c550 [diff] |
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;