Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm very interested in your topic, but I haven't solved some problems. I write articles in Chinese, but when I use search, the search results are not as expected #127

Open
k9sec opened this issue Jan 13, 2020 · 14 comments

Comments

@k9sec
Copy link

k9sec commented Jan 13, 2020

I'm very interested in your topic, but I haven't solved some problems. I write articles in Chinese, but when I use search, the search results are not as expected

But when I switch between other topics, search works

Do you need to pay attention to the application of Chinese search?

Please help me.

@eddiesigner
Copy link
Owner

I don't quite understand, what results are you expecting? Can you give an example?

@k9sec
Copy link
Author

k9sec commented Jan 14, 2020

This is the title of my article
文章

But searching for the text in the title of the article does not exist

查询

@k9sec
Copy link
Author

k9sec commented Jan 14, 2020

I don't quite understand, what results are you expecting? Can you give an example?

1

@eddiesigner
Copy link
Owner

Please donwload the latest version from here: https://github.com/eddiesigner/liebling/releases/tag/v.0.6.4

I changed something that could help.

@k9sec
Copy link
Author

k9sec commented Jan 18, 2020

I've just tested your new release, but it doesn't seem to solve my problem. I've made sure to use your new release, example

集群

例子

@k9sec
Copy link
Author

k9sec commented Jan 18, 2020

Please donwload the latest version from here: https://github.com/eddiesigner/liebling/releases/tag/v.0.6.4

I changed something that could help.

1

@ghost
Copy link

ghost commented Jan 18, 2020

i had update v0.6.4, but it did not work well in chinese too.
image
Snipaste_2020-01-18_20-06-45

@eddiesigner
Copy link
Owner

The thing is Ghost doesn't offer (at the moment) a native search functionality so I had to use the Ghost API and this library

Please enter your posts titles in the live demo and see if the search is working for you there.

Currently I'm using this configuration:

{
	shouldSort: true,
      threshold: 0,
      location: 0,
      distance: 100,
      tokenize: true,
      matchAllTokens: false,
      maxPatternLength: 32,
      minMatchCharLength: 1,
	keys: ['title', 'custom_excerpt', 'html']
}

Please play around with the options on that website and let me know if you get proper results.

@k9sec
Copy link
Author

k9sec commented Jan 20, 2020

When I directly use fuse.js for testing, there is no problem, but I can only search English using what you build, I feel very strange

@CptDoraemon
Copy link
Contributor

Hi @eddiesigner

As per your options I assume you just want to get results that can perfectly match the query.

The problem is Chinese words are not separated by spaces, for example "测试中文搜索" is actually consisted of three meaningful words :"测试", "中文", "搜索" . If I query "中文" nothing will match. It's like query "rticle" for "article" will not work with current options neither.

Maybe use the default options with match score included, then drop the results with score too high (high is worse match)?

@eddiesigner
Copy link
Owner

I updated the library, I hope that helps, please download the latest version from here: https://github.com/eddiesigner/liebling/releases/tag/v.0.6.5

@k9sec
Copy link
Author

k9sec commented Jan 26, 2020

I updated the library, I hope that helps, please download the latest version from here: https://github.com/eddiesigner/liebling/releases/tag/v.0.6.5

Sorry, Chinese search failed

@Weixiang
Copy link
Contributor

Weixiang commented Apr 18, 2020

Hi!
I tested the current version of search, and now the situation is like this:
I have a post titled "锤子科技之前的罗永浩".
Snipaste_2020-04-18_09-39-22

If I search for “锤子” or “锤子科技”, I can find this post.
Snipaste_2020-04-18_09-39-39

If I search for “罗永浩” or “科技”, I cannot find this post.
Snipaste_2020-04-18_09-39-59

This is a big problem in the Chinese language environment. 😂

@Ba3a-G
Copy link

Ba3a-G commented Feb 1, 2022

Maybe you can use Algolia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants