New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search several words #195

Closed
capcionista opened this Issue Jun 6, 2016 · 20 comments

Comments

Projects
None yet
3 participants
@capcionista

capcionista commented Jun 6, 2016

Thank you for your amazing programme! As far as I can see, it's only possible to search the content with words that follow each other. When I type word1 word2 in the search field, only notes containing word1 word2 in this order will show up, but not word1 word3 word2.

Is there any way to change this behaviour. I would be very grateful!

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2016

Thank you for your kind words and your suggestion. Currently the there is no search index, because there is no database to store the notes permanently, so such searches will be slow... I will take a look how slow this would get...

@pbek pbek added the enhancement label Jun 6, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2016

@dh-connect had similar in mind with #138

@capcionista

This comment has been minimized.

capcionista commented Jun 6, 2016

Thanks. I think the search is really the one thing where qownnotes falls short compared to other note taking applications. Are you planning to add database and search index at some point or rather not?

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2016

I fear that will not be possible or else QOwnNotes can't be a notepad, that stores all notes in plain text files, like advertised. Plus for a really huge amount of data it would be wise to use a database like mysql and a search backend like Apache Solr. Who would want to install all that on a Desktop computer?

Currently all note files are read into an in-memory Sqlite database for further processing...
But they all have to be re-read if for example a note gets deleted outside of QOwnNotes...

@capcionista

This comment has been minimized.

capcionista commented Jun 6, 2016

Do you know how Resophnotes or nvpy handle this? They also offer storage in plain text files (although Resophnotes seems buggy to me in this point)

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2016

No, I don't know. You can do almost everything, even if the performance is bad, as long as there are only "a few" notes..

@capcionista

This comment has been minimized.

capcionista commented Jun 6, 2016

https://github.com/cpbotha/nvpy nvpy search works well for about 3500 notes in my case.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2016

Searching in QOwnNotes works well too (because it's done in-memory), but reading several 1000 large text files from a spinning disk to a database on the same disk might take a few seconds...

@capcionista

This comment has been minimized.

capcionista commented Jun 6, 2016

I see.

@pbek pbek added this to the 16.06.2 milestone Jun 8, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jun 8, 2016

in version 16.06.2

  • you now can search for multiple words in notes
    • by default notes that contain every single word will be found, word1 word2 will find all notes that are containing word1 and word2
    • you can search for longer texts by using quotes, "this word1" word2
      will find all notes that are containing this word1 and word2
@pbek

This comment has been minimized.

Owner

pbek commented Jun 9, 2016

v16.06.2 is now released, can you please test it and report if the new features work for you

@capcionista

This comment has been minimized.

capcionista commented Jun 9, 2016

I will test it

@capcionista

This comment has been minimized.

capcionista commented Jun 9, 2016

It works! And for 3500 notes the still is still instaneous, much faster than e.g. nvAtom. Thank you very much, this was a crucial feature for me and I believe for many future users as well.

@dh-connect

This comment has been minimized.

dh-connect commented Jun 9, 2016

I'm still missing a hightlight function for search word, because scrolling throught the text and look for highlighted search words is much easier and faster than using the jump function, i think

@capcionista

This comment has been minimized.

capcionista commented Jun 9, 2016

+1

@pbek

This comment has been minimized.

Owner

pbek commented Jun 9, 2016

thank you, @capcionista

highlighting works for one string only, @dh-connect I haven't found a feasible way to do more complex searches, but in theory there must be a way to do it with regular expressions...

@pbek

This comment has been minimized.

Owner

pbek commented Jun 10, 2016

from the changelog of v16.06.3

  • the highlighting for text found by the search for multiple words
    feature from version 16.06.2 now also works for those patterns

could you please test that when the new release is out?

@pbek pbek closed this Jun 10, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jun 11, 2016

There now is a new release, could you please test it and report if the new features work for you?

@dh-connect

This comment has been minimized.

dh-connect commented Jun 12, 2016

hey works great

@pbek

This comment has been minimized.

Owner

pbek commented Jun 12, 2016

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment