jplattel / obsidian-query-language

An Obsidian plugin allowing you to query your notes
176 stars 6 forks source link

Table is not refreshed #4

Closed cybermizrach closed 3 years ago

cybermizrach commented 3 years ago

This is an excellent plugin. I tried to play around this plugin. I noticed that when I updated the query by removing the 2nd tag or changing the 2nd tag, the table didn't refreshed. I have to wait for a few minutes before the table is refreshed. It looks like the rebuilding the index is not yet complete. Can we get a notification when rebuilding the index is completed?

name: Case Studies
query: "'#case-study #gbpusd"
template: "table"
sort: '-created'
limit: 5
badge: false
fields: ['title', 'modified']

I only have 3 files in my vault.

image

jplattel commented 3 years ago

Hey @cybermizrach, thanks for the report! I've experienced this as well for some of my query blocks. It might have to do with the caching data. I will be looking into this for the next version! :)

PS: the next version should allow querying on tags even better!

jplattel commented 3 years ago

Alright I did some more testing & tinkering.. The renderer seems to cache on a block-basis, thus if you don't modify the query block, it renders the output from cache.

Only reloading the app or changing the query block worked to refresh the output (in your case a table). While this is sub-optimal it currently doesn't seem solvable, even the rerender function that's available on the view doesn't seem to do anything.

@cybermizrach I'm closing this for now, but I keep an eye out on future updates :)

nickynicolson commented 3 years ago

@jplattel Should release 2.0 have fixed this? As I still see similar behaviour with obsidian v0.11.13 and OQL plugin version 2.0.0

jplattel commented 3 years ago

@nickynicolson yes, v2.0.0 should have fixed this. At least in my part I don't experience it anymore.

Does the development console show any errors?