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

搜索自定义属性改为搜索全部属性 #7367

Closed
3 tasks done
zxhd863943427 opened this issue Feb 14, 2023 · 13 comments
Closed
3 tasks done

搜索自定义属性改为搜索全部属性 #7367

zxhd863943427 opened this issue Feb 14, 2023 · 13 comments
Assignees
Milestone

Comments

@zxhd863943427
Copy link
Contributor

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?

  • 我能够在默认主题下重现该问题
    I was able to reproduce the issue with the default theme

该问题是否可能是由于扩展功能导致? Could the issue be due to extensions?

  • 我已经排除了扩展导致问题的可能性
    I've ruled out the possibility that the extension is causing the problem.

描述问题 Describe the problem

这是一个非常奇怪的bug。它会搜索到完全不相关的内容。
图片

期待的结果 Expected result

能搜索到正确的内容

截屏或者录屏演示 Screenshot or screen recording presentation

这是一个非常奇怪的bug。

我本来以为是版本的问题,但是我发现在虚拟机安装后,这个bug不会出现。

然后我以为是我数据的问题,结果把我的数据导入之后,他也没有问题。

所以我怀疑他可能是思源工作空间中某一项的问题,当我把思源工作空间完全导入虚拟机之后,这个bug就能复现了。

经过不断的筛选,我把问题定位到conf.json,也就是思源的设置文件。

在经过使用git diff逐项对比,默认生成的设置文件,我找到了问题在于搜索设置的 属性 自定义。

把这个选项打开,就会搜到这种完全不相关的内容。

不得不说,这个是真的很奇怪的bug,排查的很难,出现的也很奇怪,我要是直接报上来,感觉会因为无法复现而直接关闭……

版本环境 Version environment

- Version: v 2.7.2
- Operating System: win10 
- Browser (if used):

日志文件 Log file

无需日志

更多信息 More information

No response

@88250 88250 changed the title 搜索结果不正确 打开自定义属性搜索选项后出现多余搜索结果 Feb 15, 2023
@88250 88250 self-assigned this Feb 15, 2023
@88250 88250 added the Bug label Feb 15, 2023
@88250 88250 added this to the 2.7.6 milestone Feb 15, 2023
@88250
Copy link
Member

88250 commented Feb 15, 2023

感谢反馈,是因为打开这个选项以后会在属性中搜索,然后可能关键字会命中 ID 属性。

@88250
Copy link
Member

88250 commented Feb 15, 2023

研究了一下,目前仅能够在所有属性上进行模糊搜索,无法界定自定义属性,这个问题我们改一下需求吧……

把 设置 - 搜索 - 属性 - 自定义 改为 所有属性

在属性名和属性值上同时搜索。

@88250 88250 changed the title 打开自定义属性搜索选项后出现多余搜索结果 搜索自定义属性改为搜索全部属性 Feb 15, 2023
@zxhd863943427
Copy link
Contributor Author

也就是说,以后搜索bookmark会搜索到所有带书签的块了?

@88250
Copy link
Member

88250 commented Feb 15, 2023

现在也是这样的吧

@88250
Copy link
Member

88250 commented Feb 15, 2023

这个 issue 相当于只是改一下配置项:

image

@zxhd863943427
Copy link
Contributor Author

以前还真没注意到……所以示例里 png 现在会命中 data-node-id 感觉没办法了

@zxhd863943427
Copy link
Contributor Author

话说,data-node-index是什么属性?

@88250
Copy link
Member

88250 commented Feb 15, 2023

以前还真没注意到……所以示例里 png 现在会命中 data-node-id 感觉没办法了

好消息:可以搜索属性名和值了
坏消息:可能会被干扰

如果不要干扰的话,目前只能用 SQL 搜索了,关联 attributes 表,或者用正则表达式搜索。

@88250
Copy link
Member

88250 commented Feb 15, 2023

话说,data-node-index是什么属性?

前端编辑器用于动态加载的。

@zxhd863943427
Copy link
Contributor Author

刚刚测试了一下正则表达式,发现搜索到结果不会显示出来:
图片
这是设计如此吗?

@88250
Copy link
Member

88250 commented Feb 15, 2023

你搜索的是属性还是?我这里好像没问题:

image

image

@zxhd863943427
Copy link
Contributor Author

zxhd863943427 commented Feb 15, 2023

就是单纯的内容文本,刚刚尝试移除了命名查询,又可以了。
图片
不过正则是没有高亮的么

@88250
Copy link
Member

88250 commented Feb 15, 2023

那可能是命名查询里面有其他条件吧。

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

No branches or pull requests

2 participants