NSqlQuery mergeQuery = new NSqlQuery(conn.getConnection());\r
NSqlQuery deleteQuery = new NSqlQuery(conn.getConnection());\r
\r
- indexQuery.prepare("Select distinct guid from words where weight >= " +minimumRecognitionWeight +\r
- " and word=:word");\r
insertQuery.prepare("Insert into SEARCH_RESULTS (guid) values (:guid)");\r
mergeQuery.prepare("Insert into SEARCH_RESULTS_MERGE (guid) values (:guid)");\r
\r
if (subSelect) {\r
for (int i=0; i<getWords().size(); i++) {\r
- indexQuery.bindValue(":word", getWords().get(i));\r
+ if (getWords().get(i).indexOf("*") == 0) {\r
+ indexQuery.prepare("Select distinct guid from words where weight >= " +minimumRecognitionWeight +\r
+ " and word=:word");\r
+ indexQuery.bindValue(":word", getWords().get(i));\r
+ } else {\r
+ indexQuery.prepare("Select distinct guid from words where weight >= " +minimumRecognitionWeight +\r
+ " and word like :word");\r
+ indexQuery.bindValue(":word", getWords().get(i).replace("*", "%"));\r
+ }\r
indexQuery.exec();\r
String guid = null;\r
while(indexQuery.next()) {\r