Embedded queries do not work reliably when there is a relatively large number of files and queries

Steps to reproduce

  1. Create some files with tags and - [ ] to search for
  2. Create a file with some embedded queries searching for those tags and - [ ]
  3. Check the search results in Preview mode

Expected result

Embedded queries should work reliably regardless of the number of files and queries, as long as one enters the Preview mode.

Actual result

Sometimes, it works as expected; sometimes it doesn’t.

Environment

  • Operating system: macOS Big Sur 11.2.1
  • Obsidian version: 0.11.3
  • Installer version: 0.11.0

Additional information

The query note:


The folders containing the files to be searched for and the file content (all files with tags and - [ ]have the same content respectively):

What do you mean sometimes they work sometimes they don’t? Does this that you have in the screenshort never work?

For the same file with the embedded queries, sometimes it gives expected search results in Preview mode; however, sometimes, it gives no search results, as shown in the screenshot, or it gives search results for part of the queries. This is especially true when I use embedded queries in a vault with much more notes than the one shown in the screenshots.

Can you post a screen recording of sometimes showing and sometime not showing. I want to figure out if there is a pattern?

Have you just created the files in 400-test?
If you want in preview do the show?

also no third party plugins and no css

I can’t repro this. Embed query in preview even autoupdate if you keep the preview open and open another file and add a task.

Yes. Those files were created to illustrate this issue a small vault for testing purpose. The issue was first observed in my main vault, where there are much more files inside. The following descriptions are based on my main vault.

I am not sure when and how it would happen, but I observed the following after further testing:

  • When I open the vault after closing it, I observe this issue, i.e. only part of the search results are shown in the Preview mode. However, when I change the content, e.g. add anything into the file, of a related file (this file is included in the search path) and save the file, the search results would be updated immediately, and it seems that the search results are as expected. I repeated this procedure several times, and I observed the same thing.
  • Sometimes, after freshly opening the vault, when I add a / after the path in the file with the search queries, e.g. 400-test/, the search results would be updated.

I observed this issue when using any CSS theme, e.g. the following community theme. Besides this, I did not use any other CSS snippets.
kognise/obsidian-atom: A theme for Obsidian based on Atom’s One family

Not sure if it is related, but I am also experiencing the following issues:

  • The hotkey “command + 2” does not work any more in my main vault. I tried to assign this hotkey to several commands, but none of them worked. Also, this hotkey is not reported as conflicting with others in Obsidian hotkey setting page. However, this hotkey works in the testing vault I showed in the post above.
  • Whenever I open my main vault, there would be a message popping up saying that the “Natural Language Dates” plugin was missing, and it is required by a few other plugins. I tried to re-install this plugin a few times, but this issue was not resolved.

The installed third-party plugins and their versions can be found in the following screenshots:

ok, we don’t take bug reports when third party plugins are installed. Can you reproduce this problem when no third party plugins and no css is installed?

Also, what happens when you open the vault and you wait? do the remaining tasks appear?

I experienced the same thing after turning on safe mode and without installing any CSS.

If I open the vault and wait (a few minutes), the remaining tasks did not appear, unless I change the content of a file included in the search path, which is the same as before.

If it does not contain sensitive information, can you zip your vault and send it me with DM on discord?

Sure. I have sent you a test vault that shows the issue on discord.

Is this still happening in 0.12?

Yes. I am still experiencing this issue with 0.12.1.

1 Like

+1 for this bug reporting

Experienced the same thing.

Obsidian 0.12.3, MacOS 11.3.1

Also, there are a few additional observations:

  1. when this bug appears, the search result actually does not show up.
  2. By changing the note file, such as enter some more words, and wait for roughly 1 second, the search result shows up.
    May-21-2021 17-37-00
  3. I also made test on how many items may trigger this problem.
    3.1 I created 2 notes, note-a and note-b. In each of them, there are 100 todo items. The bug dest not appears
    3.2 Based on 3.1 I create one more note, note-c, with 100 completed todo items. The bug appears.
    3.3 I delete note-a and note-b. There is only the note-c left. The bug appears.

So I think this may be caused by the completed todo item, and the number of this type of item may be an important factor.

1 Like

Uploaded the screen record for this bug. It is really annoying.
May-21-2021 18-14-12

And also, here is the content of the note-c (100 completed todo item and an embedded query)

- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task
- [x] done task

# To-Do for review
```query
task:/.*/ 

Just found this query somewhere else in this forum. Maybe this syntax helps?

```query
task-todo:"" path:Daily
```

```query
task-done:"" path:Daily
```

I can’t officially say anything because I do use templater and dataview… but I’ve noticed the exact same thing in my Daily Notes, the only place I use queries. It started about 2 months ago for me. To get it going I have to open the note, cut the query and paste it back in.

will be fixed 0.12.17

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.