guopenghui / obsidian-quiet-outline

Improving experience of outline in Obsidian
MIT License
295 stars 17 forks source link

search bug? #102

Closed atnoir closed 11 months ago

atnoir commented 1 year ago

in previous releases, it's allowed to search and filter out all headings containing such a keyword.

for example, in the following sample text.

heading 1

mood: have a terrible day

heading 2

mood: have a nice day

heading 3

nothing to share

if I search "mood", it filters out "heading 1 & 2", and if I search "terrible", only "heading 1" shows up in results.

but after the latest update, the search only works for the text in headings, not under them.

is this a bug or has it been changed?

thank you and I want the old search function back, if possible.

guopenghui commented 1 year ago

I dont quite understand. In mechanism, search area should always only filter text in headings, not including text below them.

atnoir commented 1 year ago

It looks like a fix according to what you said. So, can we search and filter out the headings whose below content contains that keyword? Thanks.

atnoir commented 1 year ago

我这样表述你看下呢?才看到你的另一个项目里直接用的中文。之前通过你的插件搜索一个关键词,结果里会显示出包含这个关键词的标题(heading)。这一点于我而言很有帮助,因为我在不同标题下有着相近的子话题,但若总是用“#”去罗列这些子标题,最后整理的大纲越来越混乱,六个标题的级别都不够用了。但若仅靠默认的文本内搜索,跳转来跳转去看着也不方便。如果说用标签(tag),同一名称的子类用标签怎么想也不现实。所以之前通过你的插件搜索就可以一目了然地将所有有关标题尽收眼底,这样很方便,既能看全也不耽误在章节间跳转。升级后今天正好要搜索一下,才发现这个功能没有了,所以才来问问。谢谢。

guopenghui commented 1 year ago

按理来说这个搜索功能就是简单的判断标题里面有没有搜索的字符串,然后显示相关的标题,标题下面的文字不属于标题,应该不会影响搜索结果才对。

最近的更新也没有对搜索过滤功能做什么大的改动呀。

要不你手动下载一下上个版本,测试是不是确实功能不一样

atnoir commented 1 year ago

也对,万一是我记错了呢?这周末我去试试。感谢回复。

qiaoxingxing commented 1 year ago

@atnoir 你想要的功能或许可以用这个方法临时替代一下: 先在子话题里也添加#号标记一下, 比如: 话题1: # xx的实现方式

用obsidian的全局搜索, 搜索同时包含#和关键词的行 file: (文件名) line: (# 关键词)

这语句可以同时搜索出heading和子话题

atnoir commented 1 year ago

@qiaoxingxing 感谢你的建议,这个确实是个比打标签更实在的临时方法。我两天也在浏览着不同的ob插件,目前发现dataview可能会很适合我前面所说的需求。周末打算尝试下。 @guopenghui 我想应该是我记错了,或者和别的软件或插件混淆了,虽然我没用同一台设备回退尝试,因为那天正好看到我的平板上的插件还未更新就测试了下是不行的,估计电脑上再回退回去大差不差。现在找到个更感兴趣的dataview,或许这个能把我想要的信息通过关键词汇集起来。谢谢。