X-Git-Url: http://git.sourceforge.jp/view?p=neighbornote%2FNeighborNote.git;a=blobdiff_plain;f=src%2Fcx%2Ffbn%2Fnevernote%2Fsql%2FREnSearch.java;h=c6802e65bff25de2b8ddff3d430db4afadc74e59;hp=3fbbaa847d4c985d1d0411f8c65738d6d11afae8;hb=db66d94837fb5ba0ed68f2d4af796fbdc998c6c0;hpb=2ef5291ed5b0f7fc4661883fa5c5630464f36522 diff --git a/src/cx/fbn/nevernote/sql/REnSearch.java b/src/cx/fbn/nevernote/sql/REnSearch.java index 3fbbaa8..c6802e6 100644 --- a/src/cx/fbn/nevernote/sql/REnSearch.java +++ b/src/cx/fbn/nevernote/sql/REnSearch.java @@ -33,6 +33,7 @@ import com.evernote.edam.type.Note; import com.evernote.edam.type.Notebook; import com.evernote.edam.type.Tag; +import cx.fbn.nevernote.Global; import cx.fbn.nevernote.sql.driver.NSqlQuery; import cx.fbn.nevernote.utilities.ApplicationLogger; @@ -396,10 +397,19 @@ public class REnSearch { searchPhrase=true; searchPhrases.add(word.toLowerCase()); } - if (!searchPhrase && pos < 0) - if (word != null && word.length() > 0) + if (!searchPhrase && pos < 0) { + if (word != null && word.length() > 0 && !Global.automaticWildcardSearches()) getWords().add(word); + if (word != null && word.length() > 0 && Global.automaticWildcardSearches()) { + String wildcardWord = word; + if (!wildcardWord.startsWith("*")) + wildcardWord = "*"+wildcardWord; + if (!wildcardWord.endsWith("*")) + wildcardWord = wildcardWord+"*"; + getWords().add(wildcardWord); + } // getWords().add("*"+word+"*"); //// WILDCARD + } if (word.startsWith("intitle:")) intitle.add("*"+word+"*"); if (word.startsWith("-intitle:"))