Skip to content

v2: (and at least EDGE) queries for index.tag "link" behave different than queries for index.tag "page" #1331

Open
@zeus-web

Description

@zeus-web

I try to get a list of pages which links to specific pages.

So I created this query:

${query[[
   from index.tag "link" 
   select {FROM = "[[" .. page .. "|" .. page .. "]]", TO = toPage, }
   order by toPage
]]}

That works basically, the table looks ok. Strange is, the order is different between EDGE and v2.

My main problem, though:

I only want to see specific pages, so I tried this:

${query[[
   from index.tag "link" 
   where toPage:startsWith("Journal")
   select {VON = "[[" .. page .. "|" .. page .. "]]", ZU = toPage, }
   order by toPage
]]}

That fails, I get an LUA error: "Attempting to cal nil as a function".

so I tried this:

${query[[
   from index.tag "link" 
   where string.startsWith(toPage,"Journal")
   select {VON = "[[" .. page .. "|" .. page .. "]]", ZU = toPage, }
   order by toPage
]]}

That fails also, this time with LUA error "A.startsWith is not a function".

I tried similar (but with other fields) with from index.tag "page" which works like a charm...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions