# Search problem feedback

**URL:** <https://discourse.joplinapp.org/t/search-problem-feedback/10437>\
**Category:** Support\
**Created:** [7 August 2020 02:31 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437 "2020-08-07T02:31:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![s4j4](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@s4j4](https://discourse.joplinapp.org/u/s4j4)\
**Post date:** [7 August 2020 02:31 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/1 "2020-08-07T02:31:18Z")

</div>

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

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

![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/9/9320071213009a7bf1d649e509906817f6ac5e36.jpeg)

---

<div class="post-metadata">

**Author:** ![CalebJohn](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/calebjohn/32/356_2.png) [@CalebJohn](https://discourse.joplinapp.org/u/CalebJohn)\
**Post date:** [7 August 2020 03:47 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/2 "2020-08-07T03:47:36Z")

</div>

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 “中国 古都”

---

<div class="post-metadata">

**Author:** ![s4j4](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@s4j4](https://discourse.joplinapp.org/u/s4j4)\
**Post date:** [7 August 2020 05:56 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/3 "2020-08-07T05:56:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CalebJohn](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/calebjohn/32/356_2.png) [@CalebJohn](https://discourse.joplinapp.org/u/CalebJohn)\
**Post date:** [7 August 2020 18:34 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/4 "2020-08-07T18:34:36Z")

</div>

Actually I just checked the [documentation](https://github.com/laurent22/joplin#searching) 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?

---

<div class="post-metadata">

**Author:** ![naviji](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/naviji/32/2502_2.png) [@naviji](https://discourse.joplinapp.org/u/naviji)\
**Post date:** [8 August 2020 02:32 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/5 "2020-08-08T02:32:50Z")

</div>

> [@CalebJohn](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![CalebJohn](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/calebjohn/32/356_2.png) [@CalebJohn](https://discourse.joplinapp.org/u/CalebJohn)\
**Post date:** [8 August 2020 05:41 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/6 "2020-08-08T05:41:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [8 August 2020 08:42 UTC](https://discourse.joplinapp.org/t/search-problem-feedback/10437/7 "2020-08-08T08:42:13Z")

</div>

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.
