obsidian-query-control icon indicating copy to clipboard operation
obsidian-query-control copied to clipboard

Show more context isn't expanding

Open daxmonson opened this issue 2 years ago • 6 comments

I've written a query and have embedded it in a note. With query control set to always show additional query result context enabled, I still have to individually click the arrows to the right of each query to show more context. Also the show more context option above all the queries doesn't do anything (all the other options like sorting work).

Any ideas here? Thanks for this great little project, it should be a core feature.

daxmonson avatar Sep 22 '22 15:09 daxmonson

Same issue here

mretier avatar Aug 31 '23 12:08 mretier

Sorry folks, I can't replicate this. Can you either of you provide more detail on how to replicate or maybe a video or screenshots?

nothingislost avatar Aug 31 '23 19:08 nothingislost

Sure. My query looks for all entries with a given heading datestamp and I'd like it to also show what is below that heading all the way up to the next heading.

here is my query:

```query
content: "#### 2023-08-28"
collapsed: false
context: true 

However, it only displays the headings themselves. There is no difference between context: true and context: false. I also tried querying for section and block to no avail.

query

mretier avatar Sep 01 '23 07:09 mretier

Ah, this is a long standing limitation of the native Obsidian search. Show more context really only works well with bullet hierarchies. It doesn't support heading context.

https://github.com/ivan-lednev/better-search-views by @ivan-lednev provides improvements to how heading context is returned

nothingislost avatar Sep 01 '23 13:09 nothingislost

That makes sense. I was using it for headings with non-bulleted hierarchies. Have been using better search view for getting more context after headings, but it solves a different use case for me than this plugin. Thanks for the response.

daxmonson avatar Sep 01 '23 17:09 daxmonson

thanks for pointing this out. I found a way to work around this using regex queries. Thanks for the great plugin

mretier avatar Sep 03 '23 20:09 mretier