commit f414981fb5f28efcaace4ab3348520716e13c6de
Author: dprunier <dominique.prunier@watch4net.com>
Date:   Mon Mar 26 12:39:58 2012

     * don't use bitvector::sloppyCount at all in category::patternSearch
     * no need to AND with the mast when there's no match in query::doEvaluate

diff --git a/src/category.cpp b/src/category.cpp
index b445197..61e095c 100644
--- a/src/category.cpp
+++ b/src/category.cpp
@@ -718,7 +718,6 @@ long ibis::category::patternSearch(const char *pat,
     LOGGER(ibis::gVerbose > 5)
 	<< "category[" << (thePart != 0 ? thePart->name() : "??") << '.'
 	<< m_name << "]::patternSearch starting to match pattern " << pat;
-    long est = 0;
     uint32_t cnt = 0;
     ibis::array_t<uint32_t> tmp;
     dic.patternSearch(pat, tmp);
@@ -726,7 +725,6 @@ long ibis::category::patternSearch(const char *pat,
 	const ibis::bitvector *bv = rlc->getBitvector(tmp[j]);
 	if (bv != 0) {
 	    ++ cnt;
-	    est += bv->sloppyCount();
 	    if (hits.empty()) {
 		hits.copy(*bv);
 	    }
@@ -735,7 +733,7 @@ long ibis::category::patternSearch(const char *pat,
 	    }
 	}
     }
-    return est;
+    return cnt;
 } // ibis::category::patternSearch
 
 /// Return the string at the <code>i</code>th row.  If the .int file is
diff --git a/src/query.cpp b/src/query.cpp
index eb7191c..07bd49f 100755
--- a/src/query.cpp
+++ b/src/query.cpp
@@ -3945,7 +3945,7 @@ int ibis::query::doEvaluate(const ibis::qExpr* term,
     case ibis::qExpr::STRING: {
 	ierr = mypart->lookforString
 	    (*(reinterpret_cast<const ibis::qString*>(term)), ht);
-	if (ierr >= 0) {
+	if (ierr > 0) {
 	    ht &= mask;
 	    ierr = ht.sloppyCount();
 	}
@@ -3954,7 +3954,7 @@ int ibis::query::doEvaluate(const ibis::qExpr* term,
     case ibis::qExpr::LIKE: {
 	ierr = mypart->patternSearch
 	    (*(reinterpret_cast<const ibis::qLike*>(term)), ht);
-	if (ierr >= 0) {
+	if (ierr > 0) {
 	    ht &= mask;
 	    ierr = ht.sloppyCount();
 	}
