tomboy-notes / tomboy-ng

Next generation of Tomboy
MIT License
389 stars 38 forks source link

Search results: title match first #314

Open monperrus opened 1 month ago

monperrus commented 1 month ago

Hi Davo,

A very useful feature of tomboy is that in the search results:

Would be great to have this in ng as well.

Thanks!

davidbannon commented 2 weeks ago

Hi Martin, sorry, not ignoring this question, been distracted.

Surprisingly, this is a difficult thing to implement. The "ListView" component you see the list of notes in is run in Virtual Mode, that means it does not contain all the data you expect, just that data that is visible now. As you scroll (or click the direction filters) fresh data is drawn from the main note database via several indexes. The issue here is that some users have huge (>20K) numbers of notes and the listview slows down badly if used directly.

Generating those index files is a very highly tuned process, multithreaded and optimized to ensure its quick.

As an alternative (but, IMHO less satisfactory) approach, how about an option (button, top right of Search Form) to search either title only or whole note ? Would need some (visible) way of reminding user of mode they are in ....

I do agree your suggestion is a good idea, not sure I want to slow down those index files however.

Davo

monperrus commented 1 week ago

As an alternative (but, IMHO less satisfactory) approach, how about an option (button, top right of Search Form) to search either title only or whole note ?

not as good as the tomboy-og option but still useful!

thanks Davo