Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent output from same query #31

Open
patowod opened this issue Sep 2, 2021 · 1 comment
Open

Inconsistent output from same query #31

patowod opened this issue Sep 2, 2021 · 1 comment

Comments

@patowod
Copy link

patowod commented Sep 2, 2021

Hi, I absolutely love OQL but am having some issues with consistency. Maybe you can give me a hint as to why this is or if it is maybe a bug? The overall idea is to be able to use e.g. mentions in daily notes and when viewing an author directly, getting a running list of all daily notes. My folder setup:

|--- Vault root (Containing the majority of notes)
|          |--- @ (Folder containing notes on events, people and so on)
|          |--- Other folders
|          |--- …
|          |--- …
|--- workbench.md
|--- other notes
|--- …

Within the "@" folder I have a test setup with three notes

|--- John Doe
|        |--- Contains OQL Block as shown below
|        |--- Mentions [[@/Jane Doe]]
|--- Jane Doe
|        |--- Contains OQL Block as shown below
|        |--- Mentions [[@/John Doe]]
|--- Jeff Doe
|        |--- Mentions [[@/John Doe]]
|        |--- Mentions [[@/Jane Doe]]

Within workbench.md I also have the same content as in Jeff Doe but at the top of the note, so essentially:
[[@/John Doe]]
[[@/Jane Doe]]

name: Unique name
query: "'@/Jane Doe" (obviously @/John Doe, within the John note)
template: "list"
format: "{name}: {count}"

Now for the results:

  • When visiting the John note, OQL lists Jeff and workbench.md (missing Jane)
  • When visiting Jane, OQL lists only the mention in workbench.md (missing John and Jeff)

Observation

Within Jane note: If I take the mention of John and move it out of the list the mention was originally in and move it to the top first line of the note it suddenly appears as a result in the note of John – same goes for the Jane note. As soon as I move the mention into the content it disappears from results (So far I tried using "content" within the query but had no luck with this).
After this observation I opened workbench.md and moved John from the top to a list within the note, or inline with some text. In both cases John note still lists the workbench.md as a result (persistent even if I quit and restart obsidian).

I’m totally puzzled: If I am missing something I really can't see it and would appreciate any help or pointer to a solution. Thanks in advance :)

@patowod
Copy link
Author

patowod commented Aug 14, 2022

Anyone out there? This issue persists.

Edit: For anyone else interested. With Dataview this is a one-liner:

LIST FROM <source>

Source: https://blacksmithgu.github.io/obsidian-dataview/query/queries/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant