Issue "reloading" externally modified pages

This is my use case:

  • Some of my pages have the tags:: property on line 1 and a sequence:: property on line 2
  • ex: tags:: a,b,c
    sequence:: 1
  • I use an external python script to adjust the values of the sequence:: property value for all necessary pages based on some external logic
  • I checked and all pages do have the necessary data after running the script
  • Then I have a query with “sorted-by” so I see my pages in order
  • That way I can reorder my pages/scenes as needed without to go change the property value manually

I noticed that, initially, my query does not return anything.

However, as I go to each page and click on the property line, the page gets “recognized” by the query.

It seems to me, I need to “force” Logseq to recognize I have properties in that page.

I tried to “refresh” as well as “re-index”, but none help.

Any clue of what I am doing wrong?


  • Ensure that the script produces Logseq-compatible markdown.
    • Check the exact result in a different editor.
      • Then compare with how it looks when it works.
    • Could share here for others to confirm.
  • Ensure that the query is reliable.
    • Could share here for others to try it.
  • Re-index (and then maybe restart) should be enough.
    • If that doesn’t work, it may be a bug.
  • Consider trying an internal javascript script, to force updating each page in the database.

Thanks for your feedback.

  • This is the query as seen in LogSeq:
    {{query (and (page-tags [[act_i]]) (page-tags [[hc]]) (page-tags [[encounter]]) (page-tags [[story]]))}}

  • This is what I see using Byword to edit the md
    ||- {{query (and (page-tags [[act_i]]) (page-tags [[hc]]) (page-tags [[encounter]]) (page-tags [[story]]))}}|
    || query-sort-by:: sequence|
    || query-sort-desc:: false|
    || query-properties:: [:page :sequence]|

  • I have checked the three first advices but I discovered Logseq 4 days ago … can’t say I am that confident my query is good

  • Checking on the Javascript and the internal Python support

I wanted share my test files here but could not find a way to upload a zip


  • The query looks ok.
    • Though I’m not sure what the vertical bars || stand for.
    • This is how it looks in my system:
    - {{query (and (page-tags [[act_i]]) (page-tags [[hc]]) (page-tags [[encounter]]) (page-tags [[story]]))}}
      query-sort-by:: sequence
      query-table:: true
      query-sort-desc:: false
      query-properties:: [:page :sequence]
  • No need to upload your test files. Just paste here the markdown of one that doesn’t work, as produced by python.
    • Paste the file inside triple backticks, to look like the one I pasted above.
    • The hypothesis is that the markdown produced by python is different than the markdown produced by Logseq itself.

I have not changed the script and cannot reproduce the issue now merging the “test” scenes with my real notes - will keep trying:

tags:: HC, Encounter, Story, Act_I, Scene
sequence:: 2

- #Synopsis:
	- text
- #Script
	- #Panel
		- Text
	- #Panel
		- Text