word search problem
Posted: Sat Jul 12, 2014 6:10 am
Here is a situation I just ran into (CN 2.7 beta 1) that is not what I expected.
1) Make a new note with title "test" and text "elephant horse".
2) Make a new note with title "test" and text "elephant goat".
3) Do a search ("Text and Title", SIW is off, SAFB is off). Search for "elephant -horse". As expected, only the note with "elephant goat" will be found.
4) Now, edit each note so the title is also "elephant" instead of "test".
5) When you do the same search for "elephant -horse", both notes are still displayed. The "-horse" has no effect.
6) If either SIW or SAFB is on, then it works as expected again.
7) It also works if I search only in "Text" instead of "Text and Title".
I think what is happening is that when the search for "elephant -horse" first finds "elephant" in the title, it then applies the "-horse" only to the title, not to the text field. Remember, SAFB is off. However, searching for "elephant horse" does manage to skip over the title and find both words in the text.
In any case, I don't understand why SIW has any effect in this situation.
Gunars
1) Make a new note with title "test" and text "elephant horse".
2) Make a new note with title "test" and text "elephant goat".
3) Do a search ("Text and Title", SIW is off, SAFB is off). Search for "elephant -horse". As expected, only the note with "elephant goat" will be found.
4) Now, edit each note so the title is also "elephant" instead of "test".
5) When you do the same search for "elephant -horse", both notes are still displayed. The "-horse" has no effect.
6) If either SIW or SAFB is on, then it works as expected again.
7) It also works if I search only in "Text" instead of "Text and Title".
I think what is happening is that when the search for "elephant -horse" first finds "elephant" in the title, it then applies the "-horse" only to the title, not to the text field. Remember, SAFB is off. However, searching for "elephant horse" does manage to skip over the title and find both words in the text.
In any case, I don't understand why SIW has any effect in this situation.
Gunars