Preserve Library View search when saving as a Query File

When saving a Library View as a Query File, include the text entered in the search box along with the selected library and filters.

Opening the saved query should rerun the search against the current library, so the results reflect newly added or changed items rather than a snapshot of the original results.

Currently, the search text is omitted, which can make the saved query show more items than the original view.

Steps to reproduce

  1. Click on the search backup button.
  2. Open the created file and find that it is the entire collection

Expected behavior

Zotlit managed to save the search.

Actual behavior

Zotlit does not want to save a search via the “Save as query file” command button. I would like to point out that the CLI is well activated in Obsidian.

Versions and environment

  • ZotLit 2.2.4
  • Obsidian version: 1.15.1
  • Zotero version: 10.0.8 (64-bit)
  • Operating system: Linux (Fedora)

Logs or screenshots (optionals)

Thanks for reporting this! Currently, “Save as Query” saves the library and supported filters, but not the text entered in the search box, so the saved query can show more items than the original search.

I agree it would be useful to save the search too. I’ll move this to a feature request and look into supporting it.

1 Like

Okay, thanks for the explanation. Have a good day!