Skip to content

docsify.search.index引发的问题及建议 #486

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

Closed
Ablegang opened this issue May 15, 2018 · 1 comment
Closed

docsify.search.index引发的问题及建议 #486

Ablegang opened this issue May 15, 2018 · 1 comment
Assignees
Labels
bug confirmed as a bug

Comments

@Ablegang
Copy link

Ablegang commented May 15, 2018

因为搜索的相关信息存储到了Local Storage,并且一个域名只有一个docsify.search.index。

当一个域名下,部署两个不相关的文档时,则会出现搜索结果不符合预期的问题。

如,当我打开http://aaa.com/docs/test 此时建立了docsify.search.index ,再打开 http://aaa.com/docs/test2 ,搜索的就是test的内容,想搜索test2特有的内容,就会出现无结果。

docsify的官网文档,搜索npm,也会出现不同语言的结果。

我建议,存储Local Storage的时候,可以按basePath来存储,就不会重复了。

在现在一个域名共享一个docsify.search.index的情况下,我的做法是设置search加上maxAge参数为100,缩短它的缓存周期。

但,这也牺牲了缓存功能。

@Ablegang Ablegang changed the title 搜索总提示“没有结果” docsify.search.index引发的问题及建议 May 16, 2018
@dmed256 dmed256 self-assigned this May 20, 2018
@dmed256 dmed256 added the bug confirmed as a bug label May 20, 2018
@timaschew
Copy link
Member

Please use English language.

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

No branches or pull requests

3 participants