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

Clairvaux
Posts: 65
Joined: Sun Dec 25, 2016 12:43 pm
Contact:

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

Postby Clairvaux » Sun Jan 19, 2020 11:45 am

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.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

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

Postby CintaNotes Developer » Tue Jan 21, 2020 9:39 am

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!
Alex
Clairvaux
Posts: 65
Joined: Sun Dec 25, 2016 12:43 pm
Contact:

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

Postby Clairvaux » Tue Jan 21, 2020 12:13 pm

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 ?
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

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

Postby CintaNotes Developer » Wed Jan 22, 2020 6:54 am

No, it works with AND by default. If you want OR, you need to use the pipe symbol (apples|oranges)
Alex
Clairvaux
Posts: 65
Joined: Sun Dec 25, 2016 12:43 pm
Contact:

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

Postby Clairvaux » Thu Jan 23, 2020 9:16 pm

Thanks, I was not aware of that.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

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

Postby CintaNotes Developer » Fri Jan 24, 2020 6:16 am

Happy to be of help!
Alex

Return to “Bug Reports”