V4 - Search not working, Windows and Android

bug

#1

First thing I can think of is that there is some weird limit in the new search engine, when it comes to the amount of notes and/or notebooks stopping it from producing any results? Because on both Windows a on Android any search gives no results. This happens in both the filter search and the search all field. No errors are thrown in the console, simply gives me no results. (The ctrl+f in editor search does work but that while probably unrelated I thought I should mention it)

Everything else seems to work fine, luckily I hardly ever use the search function anyway but I’d expected more people to report this? So that is why I’m thinking it could have something to do with my amount of notes or setup.


(Takuya Matsuyama) #2

Hi Sceptic,

Thank you for the report.

v4 has a new search engine which will rebuild index from scratch.
Please wait for a while after it finished to sync.


#3

That might be it, but it has been over an hour already? Or is it rebuild once a day or something? :S

Also a little notification like, rebuilding index please wait with using search would have been nice if that is the case. :wink:


(Takuya Matsuyama) #4

That’s weird. I haven’t ever heard about that issue while it is in beta.
I need to reproduce the problem.
Maybe some notes are causing the issue, like special characters or something?


I can't use Search All function and Filter function on Mac
(Takuya Matsuyama) #5

You can use the demo version to try reproducing:

https://my.inkdrop.app/demo


#6

I also thought about the possibility of special characters messing up the party. Maybe put some parts of the search feature where you think the error happens in a try catch and throw the log errors to the console for next version so I can see what the console comes up with?

How could I use the demo version to reproduce it? I can only begin to guess at what is causing it at this point, I’d have to know more on the used tech and your code.

Note that I really hardly ever use search and wont really miss it.


(Takuya Matsuyama) #7

Yeah you are right, we have to know more to dig into it.

The FTS happens in the main process, so you won’t get any errors on Developer Tools because it’s on renderer process.
I guess you can get some logs if you run .exe from terminal (command prompt).
If you couldn’t get anything, I would like to insert some debug code.

Thanks for your help!


#8

I had a try but no good, but I think you disabled the available debug tools on your published .exe that you are probably referring to. :wink:

I’ll just wait till you add some debug code for next version, we might get lucky! :smiley:


(Takuya Matsuyama) #9

Ok, sure!
BTW it’s late in Japan. I’ll build a debug binary tomorrow.
Thanks again!


#10

No hurry on this! Thanks!


(hiro) #11

I am having the exact same problem after upgrading to v4, but only on one of my two Windows machines, not on the other.
On Android, the new search finds some notes, but not others.


(Takuya Matsuyama) #12

The same module is used across all platforms.
I suspect that updating fts index is not being triggered for some reason.

Okay, I built the app with some debug log levels enabled.

@Sceptic, @Hiro, can you please try it? Don’t forget to run it from terminal to get logs from the main process.

https://inkdrop-dist.s3-ap-northeast-1.amazonaws.com/tmp/Inkdrop-4.0.0-Windows-patch-2.zip

You can manually execute rebuilding FTS index from application menu: Developer -> Rebuild FTS Index.


(Takuya Matsuyama) #13

Another user encountered the same issue but has resolved.

That was because indexing has not been triggered until he edited a note.
I will fix it to update FTS index every time after sync.


#14

Aah yes it seems to work after editing notes, and I thought it was simply finally done building the index when it just worked this morning! :stuck_out_tongue: Yeah, if you’d force it to update on all notes once after installing the update it should actually be fine to only rebuild after edits. Thanks for finding a fix!


(Takuya Matsuyama) #15

Great! Thanks for checking that.

To anyone who encountered the issue: The workaround for now is to edit a note and to wait for a while.


#16

I notice searching is pretty slow on Android, maybe it would be nice to have a little spinner or something to indicate its still busy?


(Takuya Matsuyama) #17

Yeah, it would be nice to show a spinner indicating the indexing is running!


(hiro) #18

I just updated to 4.0.1 and the problem is gone. Many thanks for the quick fix, @craftzdog!