Standard Search Not Producing Any Results

Operating system

Linux

Joplin version

2.11.11

Desktop version info

Joplin 2.11.11 (prod, linux)

Client ID: c4ad3889bb104a54afa2480630482db5
Sync Version: 3
Profile Version: 43
Keychain Supported: No

Revision: 6886f6f

Simple Backup: 1.3.3

What issue do you have?

The standard search function (using the search box in the main GUI) no longer produces any results, even for simple search terms like "file" or "the". The basic search function (prefixing the search term with a forward slash) works well. I saw this thread that suggests the issue may be database corruption: Search function not working anymore?

Screenshots

Screenshot from 2024-08-02 13-42-15.png

Can anyone help with this! I can't find a solution in the forums or elsewhere. Any help appreciated :pray:

I've updated my installation of Joplin to v3.0.15, and the problem still occurs.

Below are 2 screenshots showing the results for searches with and without the forward-slash prefix.

Screenshot from 2024-08-23 23-01-29
Screenshot from 2024-08-23 23-01-45

I also don't understand why I haven't had any response to my calls for support - please respond! If there's something inappropriate about my request, please tell me. Thank you.

Do you have any error or warning in the log? Joplinapp.org/debugging

It looks like the search index is not being built

But also it's an old version, try 3.0 since there has been fixes to search since then

Thanks for your replies @laurent
As I said in an earlier post, I have updated to Joplin V3.0.15 and the problem still occurs.

I followed your suggestions. Before enabling debugging, I checked the Developer Tools Console after trying a search and saw this error, which seems to diagnose database corruption - is that right?

/tmp/.mount_Joplin9xV2o5/resources/app.asar/node_modules/@joplin/utils/dist/Logger.js:270 15:29:33: Cannot execute MATCH query: phone: Error: SQLITE_CORRUPT: database disk image is malformed: 
	SELECT
	notes_fts.id,
	notes_fts.title,
	offsets(notes_fts) AS offsets, matchinfo(notes_fts, 'pcnalx') AS matchinfo,
	notes_fts.user_created_time,
	notes_fts.user_updated_time,
	notes_fts.is_todo,
	notes_fts.todo_completed,
	notes_fts.parent_id
	FROM notes_fts
	WHERE 1 AND notes_fts MATCH ?: "phone*"

After enabling debugging and restarting Joplin, I tried another search and this text appeared in the console:

node:internal/process/task_queues:95 15:37:49: Cannot execute MATCH query: the: Error: SQLITE_CORRUPT: database disk image is malformed: 
	SELECT
	notes_fts.id,
	notes_fts.title,
	offsets(notes_fts) AS offsets, matchinfo(notes_fts, 'pcnalx') AS matchinfo,
	notes_fts.user_created_time,
	notes_fts.user_updated_time,
	notes_fts.is_todo,
	notes_fts.todo_completed,
	notes_fts.parent_id
	FROM notes_fts
	WHERE 1 AND notes_fts MATCH ?: "the*"
node:internal/timers:573 15:37:53: SearchEngine: Updating FTS table...
node:internal/process/task_queues:95 15:37:53: SearchEngine: Error while processing changes: Error: Error: SQLITE_CORRUPT: database disk image is malformed: DELETE FROM notes_normalized WHERE id = ?: b759919ca5ab4e7fa5aaa223809baf9f
    at DatabaseDriverNode.sqliteErrorToJsError (/tmp/.mount_JoplinKV…river-node.js:23:18)
    at JoplinDatabase.sqliteErrorToJsError (/tmp/.mount_JoplinKV…b/database.js:36:30)
    at JoplinDatabase.<anonymous> (/tmp/.mount_JoplinKV…/database.js:141:36)
    at Generator.throw (<anonymous>)
    at rejected (/tmp/.mount_JoplinKV…ib/database.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Yes looks like the database is corrupted so there's not much to do unfortunately. Best would be to restore from a backup if you have one, or export all your notes, delete the profile and import them back.

Thanks for the response Laurent. Is it ok to restore from a backup made after the database corruption occurred?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.