substance / notes

Real-time collaborative notes editing.
Other
21 stars 5 forks source link

Full-text searching of notes #93

Open michael opened 8 years ago

michael commented 8 years ago

I think this will be an important feature for the notes app to be actually useful. However, I don't think we should come up with a full-fledged server-side full text search solution. That will make the app complex to setup and maintain.

Assumptions:

Goals:

Integral commented 8 years ago

I think that you run search when you can't remember something, you can't remember something when it was a long time ago, so it's not about recent documents. It's not what somebody will expect.

On Thu, Apr 14, 2016, 16:05 Michael Aufreiter notifications@github.com wrote:

I think this will be an important feature for the notes app to be actually useful. However, I don't think we should come up with a full-fledged server-side full text search solution. That will make the app complex to setup and maintain.

Assumptions:

  • most people won't create and collaboratorate on more than say 50 notes
  • most recent notes are the one you are typically interested
  • notes won't be of very large size most of the time
  • If we displayed the most recent 20 notes in the dashboard and include the full html body of the note in the result that would still load fast enough
  • we would then be able to do client-side full text search using this lib (http://lunrjs.com/)

Goals:

  • provide nice search UI on dashboard to find stuff you wrote about
  • easy to maintain (no extra server-setup), people should be able to npm install the app and run it locally.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/substance/notes/issues/93

michael commented 8 years ago

Of course it's not perfect but I don't want to deal with the complexity of full-text search infrastructure. Triggering indexes, dealing with the delay etc.

For me this covers a lot of cases when i think about myself how i would use the app. I would make a note Italy trip and write down stuff there like phone number of my apartment host.

Then two days later.. i search for apartment. I will get the result immediately, no server-response delay.. which is nice. Only drawback is that i would need to make some limit of how many notes to fetch from the server. Another advantage is that the server will never be under load as the clients are doing the searches. I think notes is really a use-case where this works, as you only search in notes you are involved in.. and not globally among thousands of docs.

I have 50 notes in my iCloud, which i created over the last 5 years or so. I could easily fetch all of their contents in a single http request and it wouldn't be slow.

I think it's a fair limitation to say you can search your 50 most recent notes. you could also click on the button load all notes, then it may take a bit to load them all but then you can search everything in memory. Don't forget we could also cache notes locally for search so we don't need to fetch all of them all the time if they don't change.

Integral commented 8 years ago

I can't agree with that. You will introduce a lot of limitations for a one very controversial feature. However I don't want to debate, if you want to do that - pls do it. We will see later all negative effects. PS: keep in mind that lunrjs don't have highlighting of results.

michael commented 8 years ago

No I won't do it if you are not convinced. Let's wait with search, until we have more time and we find agreement on a path. :)