V2 Example query returns nil

${query[[ from p = index.tag “page” order by p.lastModified desc select p.name limit 3]]} returns “Lua error: attempting to call nil as a function”

${query[[from index.tag ]]} returns “Lua error: collection is nil”

What did I miss?

Hi Russ,
Try this:

${query[[
  from p = index.tag "page" 
  order by p.lastModified desc 
  select p.name
  limit 3
]]}

In the text you pasted you are using “page” instead of "page" - different " characters - doesn’t reproduce the same error at my end but give it a ago with this fix.

For the second thing you need to specify what you’re looking for:

${query[[from index.tag "page"]]}
-- or
${query[[from index.tag "meta"]]}
-- and so on....

Good luck!

Thanks for the suggestions, Spectral…but no joy.

I think there’s something wrong with my “index.tag” like there’s nothing in it.

I only have 197 files in my space, and nothing custom in my Library *(yet), and re-indexing takes For. Ever. I’m not sure it even finishes.

What do I need to do to clobber all the SB data?

This suggests indexing is stuck somewhere. Can you have a look at your JavaScript console and see if there is anything suspicious going on there?

I have been deleting the SB index in Firefox (all of the site data, for all sites, actually) between attempts. I even rebooted a time or two…

I had a particular file getting mentioned over and over. It was symlinked to another folder on the same drive, so I deleted the link.

I next removed the bulk of my files from the SB_FOLDER. They are in folders which are all symlinks to other folders on the drive. My Space now has about 2 dozen files, a bit of custom Lua in Library, and my STYLES.md – indexing during troubleshooting will be faster at least!

I saw a “logo.png” getting indexed over and over, so I renamed it “logo.PNG” and the messages stopped. I changed it back to “logo.png” and it got indexed once.

I noticed that when I browsed to the Silverbullet site on the web I got the “something wrong with your indexer, restart your browser”.

I’m running the Ad Nauseum extension, and I’ve turned it off for both SB on the web and my localhost:3000 pages.

EDIT: I scoured the Space for links and removed them all. It now completes indexing (per the JS console in Firefox).

Queries against “index.tab” still don’t work.

Do you have any plugs installed?

I had TreeView, but I took it out and still get query error.

To be clear: is it enough to just delete site data for Localhost and Silverbullet in my browser? Do I need to re-start anything else? (I get the “sync engine” error every time I open my Space for the first time)

Here’s the troubleshooting page that shows you to reset and disable various things: Troubleshooting If you add ?resetClient=1 to your URL, it will wipe all local stuff and start out clean. That’s worth trying.

What you were describing sounded a lot like an issue Silversearch was having a little while back, but if you don’t have that plug installed that can’t be it either.

resetClient didn’t fix it.

I tried installing Chromium, and a tiny browser called “LuaKit” – nope.

Now I’m getting this in a terminal window, over and over:

2025/10/06 11:00:19 Error deleting file: cannot delete file _plug/core.plug.js: read-only file
2025/10/06 11:00:19 Error deleting file: cannot delete file _plug/editor.plug.js: read-only file
2025/10/06 11:00:19 Error deleting file: cannot delete file _plug/emoji.plug.js: read-only file

#> sudo reboot now :face_with_spiral_eyes:

Err whut? What version are you running and in what environment? Docker?

version 2.1.7-0-g5be6297, running the binary in a terminal window, no docker

of course, now i’ve rebooted and it stopped doing the strange message

EDIT: also Firefox 143.0.3 (64-bit), Linux Mint 22.2 Zara base: Ubuntu 24.04 noble

I removed my STYLES.md from the Space, and …

IT WORKS!!!

Thanks for the guidance. I don’t know yet what I did wrong, but I have a bunch of new troubleshooting tools to make notes on !!!

Errr whut? What was in your styles file?

Once I figure out what I did, I’ll post it here.

I’m sure it was a bad quote, or a === where I needed ==, or an Alt-Meta-Shift-Unicode-Rubles sign that summoned a demon.