Thomas Lohrum wrote:It feels strange to use a phrase syntax, just because i search for "-". I still think it would be smart to use a different symbol like "!", e.g. !CintaNotes searches for all notes NOT containing the word "cintanotes". In sentences the exclamation marc is used after a word, thus it should never conflict when used in the search phrase. It also relates to C's negation. Since negation did not function over the last two years, changing the symbol now, should be no problem.
Negation did function when you used it with some non-negated term like this: "word1 -word2". I doesn't work only when you use it alone. Concerning the case when you use it alone - well, you have to sacifice something when you need a really fast search. Full-text search has its limitations - try searching for "-term" on Google for example

I'd like to keep the "-" symbol because it is in line with the Google's search syntax which is familiar to most people. Using "!" is very unconventional and will confuse many users. I guess it seems natural to you and me because we are developers, but I doubt other people would find it easy to understand.
Now let's think what can we do:
1) The "-word" search error can be fixed via fiddling with the SQL conditions, and it will be done.
2) When you'll want to search for "-something", you'll have to use doublequotes. This will function the same way regardless of the "search inside words" option.
3) Since the "-" symbol is not included into the full-text index anyway, CintaNotes will silently use LIKE-based search under the hood.
4) Full text search will be used only in the following cases:
- "Search inside words" option is off;
- Large notebook size (> 10MB)
- Searched words contain only letters, digits and underscores (other symbols are not indexed by FTS anyway).
This way the user won't have to know which search is used, and FTS will be used just as a speedup opportunity.