HappenApps / Quiver

Quiver documentation and issue tracker
2.26k stars 109 forks source link

"Search Note" doesn't work #1202

Closed kimin-yun closed 5 years ago

kimin-yun commented 5 years ago

I just updated to the new version, but the search note does not operate... Update log says "the Better Full-Text Search", but it is out of order. I think the search function is the most important thing in the note app, so please fix it quickly.

Quiver version: 3.2 MacOS: Mojave 10.14, Mac Pro

ylian commented 5 years ago

Need more information.

ryokbys commented 5 years ago

The same here. I just updated from 3.1.2(?) to 3.2, and then tried to search notes via "Search Notes...", but there is no search results and no response in search pop-up (small) window saying just "Full-Text Search in All Notes". Tried to search several words obviously contained in the title of the current note, but it didn't work either. I really love this app, though.

MacOS: Mojave 10.14 and High Sierra 10.13.?, MacBookPro.

ylian commented 5 years ago

@ryokbys Okay. Let me add a "Rebuild Search Index" option and send you a build.

runrunrirun commented 5 years ago

Same issue, I saw the app building some kind of index at first run on 3.2, but searching for anything returns nothing. Quit and restarted the app, same result. I have my files on Dropbox.

Mojave 10.14.1

ylian commented 5 years ago

Okay, clearly this is affecting quite a few users. I am focusing on fixing this issue now.

I suspect the culprit is a mismatch of index names. Let me create a debug build so someone can help me print out some debug info.

ylian commented 5 years ago

Can someone run this dev build and send me the debug info? Thanks.

https://www.dropbox.com/s/s3ykrkjl2v4n62q/Quiver%203.2.1-dev.zip?dl=0

Open Console.app, open Quiver and do a few searches, filter the console logs by "Quiver", then copy the logs and paste it here.

ylian commented 5 years ago

If running the dev build is too much work, maybe someone can send the following to my email (ylian@happenapps.com):

  1. Your Quiver library's full path (File > Show Library in Finder)
  2. This file: ~//Library/Containers/com.happenapps.Quiver/Data/Library/Application Support/Quiver/index-v2.dat

Appreciate it.

runrunrirun commented 5 years ago

quiver-debug.zip

Hopefully this got attached :/ Logs from the debug build and screenshots from 3 searches - one with text present in the note but nothing shown in Search, one text that shouldn't be found, and one in which the search found the text in the note (?) Hope this helps.

ylian commented 5 years ago

@runrunrirun Appreciate it.

First, I noticed that you seem to be running 3.2. Please update to 3.2.1 and try again.

Second, one note does get found, so that narrows down my debugging quite a bit.

Third, the debug info is not present in the log unfortunately. Maybe you didn't do search while Console.app is open. It should contain something like this:

default 09:29:39.541821 +0100   Quiver  runSearch: fwef e, (
    "/Users/ylian/Dropbox/Apps/Quiver.qvlibrary",
    "/Users/ylian/Dropbox/Apps/Tests.qvnotebook"
)
default 09:29:39.542585 +0100   Quiver  modifiedQuery: *fwef* *e*
default 09:29:39.543610 +0100   Quiver  searchIndexesByName: {
}
default 09:29:39.550196 +0100   Quiver  SKIndexOpenWithURL: /Users/ylian/Dropbox/Apps/Quiver.qvlibrary
default 09:29:39.550923 +0100   Quiver  name: /Users/ylian/Dropbox/Apps/Quiver.qvlibrary
default 09:29:39.632005 +0100   Quiver  results: 0
default 09:29:39.632397 +0100   Quiver  searchIndexesByName: {
    "/Users/ylian/Dropbox/Apps/Quiver.qvlibrary" = "<SKIndex 0x6000014dc000 [0x7fffa9db48f0]>";
}
default 09:29:39.632657 +0100   Quiver  SKIndexOpenWithURL: /Users/ylian/Dropbox/Apps/Tests.qvnotebook
default 09:29:39.632734 +0100   Quiver  name: /Users/ylian/Dropbox/Apps/Tests.qvnotebook
default 09:29:39.634844 +0100   Quiver  results: 6

Appreciate your help.

ylian commented 5 years ago

@runrunrirun Were the screenshots taken with 3.2 or 3.2.1-dev?

ylian commented 5 years ago

I think I found the issue.

ylian commented 5 years ago

Yep, I figured it out. A tiny little UI bug, similar to #1201. Will submit 3.2.2 with the fix today.

ylian commented 5 years ago

If you want a quick fix before 3.2.2 is out, run the following in a terminal:

defaults delete com.happenapps.Quiver SortOrderSearchResults

And reopen Quiver.

ryokbys commented 5 years ago

Yes, it worked. Thanks a lot.

runrunrirun commented 5 years ago

Sorry about that, I think I had both versions running and used the wrong one :( The defaults fix works foe me also, but there is still some wonkieness here, I will log a separate ticket,

ylian commented 5 years ago

@runrunrirun Great, thanks for your help. I wouldn't have figured it out if not for your screenshots.

ylian commented 5 years ago

Fixed in 3.2.2. Thanks for everyone's help!

dmdque commented 5 years ago

I'm observing a similar issue with Quiver 3.2.4. Is there a way to rebuild the search indexes? The defaults command gives:

Domain (com.happenapps.Quiver) not found.
Defaults have not been changed.
ylian commented 5 years ago

@dmdque

To rebuild the search index, first take note of your library location (Preferences > Sync > Library Location).

Delete the cache file and the search index file: ~/Library/Containers/com.happenapps.Quiver/Data/Library/Application\ Support/Quiver/cache.db ~/Library/Containers/com.happenapps.Quiver/Data/Library/Application\ Support/Quiver/index-v2.dat

Then double click on your library to open it again. Search index will be rebuilt.

dmdque commented 5 years ago

It worked, thanks! I suggest adding those instructions to the documentation so it can easily be found.