X-Git-Url: http://git.sourceforge.jp/view?p=neighbornote%2FNeighborNote.git;a=blobdiff_plain;f=src%2Fcx%2Ffbn%2Fnevernote%2Fsql%2FREnSearch.java;h=6079515a684fea579be6552a8c3b9c533ccfffbe;hp=059548e83436afb4a33e3c36e71ecac229e5e743;hb=938b09788d906b7231dafb15357453c88b017efe;hpb=b2a6dabd0ba95ce8da98de264d04b4c75f913690 diff --git a/src/cx/fbn/nevernote/sql/REnSearch.java b/src/cx/fbn/nevernote/sql/REnSearch.java index 059548e..6079515 100644 --- a/src/cx/fbn/nevernote/sql/REnSearch.java +++ b/src/cx/fbn/nevernote/sql/REnSearch.java @@ -710,14 +710,20 @@ public class REnSearch { NSqlQuery mergeQuery = new NSqlQuery(conn.getConnection()); NSqlQuery deleteQuery = new NSqlQuery(conn.getConnection()); - indexQuery.prepare("Select distinct guid from words where weight >= " +minimumRecognitionWeight + - " and word=:word"); insertQuery.prepare("Insert into SEARCH_RESULTS (guid) values (:guid)"); mergeQuery.prepare("Insert into SEARCH_RESULTS_MERGE (guid) values (:guid)"); if (subSelect) { for (int i=0; i= " +minimumRecognitionWeight + + " and word=:word"); + indexQuery.bindValue(":word", getWords().get(i)); + } else { + indexQuery.prepare("Select distinct guid from words where weight >= " +minimumRecognitionWeight + + " and word like :word"); + indexQuery.bindValue(":word", getWords().get(i).replace("*", "%")); + } indexQuery.exec(); String guid = null; while(indexQuery.next()) {