-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Search result from API is stale after sync #11631
Comments
The search engine would need to index the note first, and I don't think that can be triggered via CLI. You'd need to start the TUI and let it run for some time, a few seconds probably, until indexing is done |
I had this same issue when trying to run the CLI and use the API. Ended up having to run a full desktop environment to keep Joplin Desktop running and use the API that way. It would be a welcome functionality change if at all possible for automation! |
Adding something like a |
In addition, should sync and API calls trigger indexing automatically? For example, API calls that update data (e.g., POST, PUT) should trigger indexing so that the next API call to In these cases, API and sync code have more information what has changed and can be more efficient. If we expect users to call |
Or maybe we don't need |
What does I use |
Operating system
Linux
Joplin version
CLI 3.0.1 from NPM + Joplin Desktop 3.1.24
Desktop version info
Joplin for Desktop
Copyright © 2016-2025 Laurent Cozic
Joplin 3.1.24 (prod, darwin)
Client ID: 41fd86eba6dd407a94d2655b86ad878a
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes
Revision: d581264
Backup: 1.4.2
Joplin DDDot: 0.4.2
macOS theme: 1.5.8
Markdown Table: Colorize: 1.2.0
Quick Links: 1.3.2
Current behaviour
I use CLI to start API server to automate creating some notes. However, after syncing, the search result doesn't return new notes.
In my setup, I have 2 clients: my Joplin Desktop syncs to WebDAV and a CLI client syncs to the same WebDAV.
Steps to reproduce:
joplin --profile /joplin/profile server start
joplin --profile /joplin/profile sync
87f0ba5654be445fb6f17ca10f412b04
was fetched.notebook:"Welcome!"
doesn't return the note. It returns other notes in the same notebookThus, the search result is stale for some reason. The note data is already there after sync but the search result doesn't reflect the data. Perhaps, the SQLite full-text search needs update to reflect the new data. Is there a command to force SQLite to update?
Expected behaviour
After sync, the search result should show the new notes to reflect the data Joplin has.
Logs
The text was updated successfully, but these errors were encountered: