Search problem feedback

  1. Type “中国 人民” in the notes。

  2. Use “中国 古都” to search and you can find this note. What is the reason?

image

When you separate characters by a space Joplin will look for notes that contain either of those terms so in your case Joplin will match notes with either 中国 or 古都 inside of them. If you want to only match the phrase 中国 古都, then you’ll need to wrap it in quotes “中国 古都”

Hello there:
I want to search for notes containing “中国” and “古都”. How do I do this?

Actually I just checked the documentation at it looks like I was wrong, sorry about that. In you case this search should be containing notes that include 中国 and 古都, but not necessarily together. This appears to be a bug with the current search implementation.

Fortunately there is work to overhaul the search system.
@naviji will this search work with the search overhaul?

No, since this will do a basic search instead of an FTS search. My modifications are, for the most part, confined to the FTS search part.

But I took a look at the code, and it seems that we are only considering the first search term ("中国" here) when doing a basic search and ignoring everything else.

I'll try to make a PR to fix this after GSoC.

This is because FTS search is only applied to ascii characters?

FTS works on a word index, and words are easy to extract in alphabetical languages (they can be split by space, comma, etc.) but in Chinese language there’s no spaces to delimit the words, so to split them we’d need some kind of dictionary to recognise what’s a word or not.

It can definitely be done and there’s a good open source Chinese dictionary that would help, but it’s still quite a bit of work.

1 Like