Page 1 of 1

A single extra space defeats search (and search is generally a pain)

Posted: Sun Jan 19, 2020 11:45 am
by Clairvaux
I love Cinta Notes. It's my daily workhorse. However, it does not scale well past a certain point.

I now have 12 000 notes in my main tab, and search is beyond painful, unless the note I look for is a few days old.

Let me give you a single example that I experienced recently. I clip articles from the Web all the time. Normally, just pasting the title in the search field should be enough to make the relevant note come up. However, English typography sticks the colon right after the word before. I find this ugly. I add a space before the colon. This completely breaks search.

If the title of the note is :

The quick brown fox : jumps over the lazy dog

And I search for :

The quick brown fox: jumps over the lazy dog

The result of the search will be empty.

This is silly. It seems to me it should at least bring up all the notes which have either the, quick, brown, jumps, over, lazy or dog in them.

This occurs with Search Anywhere selected. Toggling Search Inside Words, Search Across Field Boundaries or Use * and ? Wildcards does not change anything.

There are many such unexpected fails.

______

Cinta Notes 3.13, Windows 7 Home Premium 64-bit.

Re: A single extra space defeats search (and search is generally a pain)

Posted: Tue Jan 21, 2020 9:39 am
by CintaNotes Developer
Hi Clairvaux,

I understand the problem. The issue it that CN uses a full-text index for search that is included with SQLite.
And it works by tokenizing text into words and indexing those words.
It is smart enough not to treat semicolon as part of the word when indexing - so far so good.

But when you search, it assumes that since you explicitly write that semicolon at end of the word, you really care about it!
So in your example, you search for "fox:" but it only has "fox" in the index.

And actually this is not exactly bad - thanks to this you are able to find all "100%"s while skipping all simple "100"s.

Some simple workarounds are:
1) Make sure titles stored and titles searched match
2) Remove all semicolons from the search string.

I know this doesn't help much but this is the best I could come up with!

Re: A single extra space defeats search (and search is generally a pain)

Posted: Tue Jan 21, 2020 12:13 pm
by Clairvaux
Thank you for looking into this. But I still don't understand. Should not the search return notes which have the other words in them ? I understand the word with the colon is not found, but the others ? Does not it work with OR as default ?

Re: A single extra space defeats search (and search is generally a pain)

Posted: Wed Jan 22, 2020 6:54 am
by CintaNotes Developer
No, it works with AND by default. If you want OR, you need to use the pipe symbol (apples|oranges)

Re: A single extra space defeats search (and search is generally a pain)

Posted: Thu Jan 23, 2020 9:16 pm
by Clairvaux
Thanks, I was not aware of that.

Re: A single extra space defeats search (and search is generally a pain)

Posted: Fri Jan 24, 2020 6:16 am
by CintaNotes Developer
Happy to be of help!