Multi Database Search

Forum rules
1. Please keep it one request/suggestion per topic.
2. Please mark the requests with the following tags:
[Startup] - issue related to the program's startup or shutdown process;
[Taking] and [Clipping] - related to acquiring/creating notes (excl. editing);
[Viewing] - related to notes list browsing and reading;
[Editing] - related to the process of editing new and existing notes;
[Search] - related to note searching and finding;
[Managing] - related to note organization and management;
[Reordering/Sorting] - related to sorting or reordering the notes list;
[Clipboard] - clipboard operations;
[Import] and [Export] - issue related to bulk notes import/export;
[Globalization] - issues related to multiple languages/cultures support;
[Files] and [Backup] - file operations,notes back-end and backup;
[UI] - UI issues which don't fall into any of the above categories;
[Other] - other issues which don't fall into any of the above categories.

Thank you!
User avatar
usbpoweredfridge
Posts: 410
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Multi Database Search

Postby usbpoweredfridge » Fri Oct 09, 2015 10:45 am

This might already be in the roadmap (if so, a link would be appreciated so I could add my vote for it) - it would be nice to have a way to search across multiple databases. I know this isn't trivial to do - but I thought I would throw it out there anyway. The way I use my notes is that for performance reasons, I have saved my notes across multiple database files, each one named as a type of category (eg software tips, useful links etc). This system works fine - until you need to find a note, and you are not 100% sure what database file it is in, as it may fit into more than one category.

I suppose as CN's database files are standard SQLite files, you could use a separate utility to do this (there are multiple database file browsers out there) - but it would be nice to have this in program.

Chris
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Multi Database Search

Postby CintaNotes Developer » Fri Oct 09, 2015 12:31 pm

Hi Chris,

Thanks for the suggestion. Unfortunately this is not simply hard to do, it is VERY hard to do.
And ever harder to create a nice and logical UI for this.

My advice: use sections instead of notebooks. Then you have both the performance gain
(when you search within one section, it is almost as fast as it would be if other sections didn't exist),
and convenience of having all notes in one database.

Also if you need to do this search not very often, just import all databases into a new one, and search it.

Hope this helps!
Alex
User avatar
usbpoweredfridge
Posts: 410
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Multi Database Search

Postby usbpoweredfridge » Sat Oct 10, 2015 1:23 am

Hi Alex,

Thanks, I had a feeling it would be really hard to do. I will do some testing with the sections workaround and see if it suits my needs. I have done some preliminary testing, and I think I may have noticed a couple of issues with sections in general - I will post those in the bugs forum and then continue checking it out. I think I can work with it at this stage though.

Regards.

Chris
User avatar
usbpoweredfridge
Posts: 410
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Multi Database Search

Postby usbpoweredfridge » Sat Oct 10, 2015 9:44 am

Is there any other way to merge the multiple notebook into a new notebook, rather than creating the new notebook, and then copying/pasting the notes from the other notebooks into it? I have actually done that - and now I see that apparently copying/pasting screws up the tags in the notes. For example, in a notebook, I have 57 notes with a specific tag. In my new notebook, that section has 58 entries with that tag (so one more than the original notebook), and also, when I click on that tag to filter it down, it shows another tag that is totally un-associated with it (CN is set to 'only related tags' - so in the original notebook when I click the tag, I get related tags a b c but in the new notebook, I get a b c d and checking the notes in the new notebook, d is not listed in the tags field for any notes that I can see).

I don't know what went wrong with the copy/paste, but something clearly did (unless CN is using its own clipboard, I don't think the Windows clipboard is robust enough to copy/paste between notebooks).

Chris

Edit #1: I wasn't aware exporting included the tags (so I assumed copy/paste was the only way to move notes between notebooks), so what I will do is to kill the new notebook I created, export each of my original notebooks, and then import them into a new notebook, and see if the numbers of tags+notes match up between the two.

Edit #2: Sigh. Exported two notebooks as a test, and created a new notebook with two sections to hold them. Imported the first .xml file - discovered that CN sadly does not import the notes into the section you currently have open in your new notebook (which is what I would logically expect to happen), instead it just dumps them into a new section called 'main'. So you then have to move the newly imported notes to the relevant section before you import the next xml file (otherwise you will get your notes all mixed up with each other). Then, on the second xml file, CN only imported 420 notes - and there were 421 in the original xml file. I'm not going through that many notes one by one to try and work out which note it didn't import (and that would not tell me why it failed anyway). I give up, will just continue to use multiple notebooks and forget about trying to search them all.

Edit #3: Ran the export+import again just to test. CN warned of a duplicate record upon import, which is why it imported one less previously (logically, I guess this makes sense, but is still frustrating from a user perspective - in SQL form, each record will have a unique record ID even if the text contents are the same, whereas when you export this information is not included and thus when CN imports, it checks the text and decides that two records are the same, though there should be an option upon import to ignore duplicates). Regardless, I'm not going through 420 records to try and work out what record CN doesn't like, so will stick with multiple DB files.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Multi Database Search

Postby CintaNotes Developer » Mon Oct 12, 2015 10:56 am

usbpoweredfridge wrote:Is there any other way to merge the multiple notebook into a new notebook, rather than creating the new notebook, and then copying/pasting the notes from the other notebooks into it?

Yes, you simply do File/Import from the .db file.

I have actually done that - and now I see that apparently copying/pasting screws up the tags in the notes. For example, in a notebook, I have 57 notes with a specific tag. In my new notebook, that section has 58 entries with that tag (so one more than the original notebook), and also, when I click on that tag to filter it down, it shows another tag that is totally un-associated with it (CN is set to 'only related tags' - so in the original notebook when I click the tag, I get related tags a b c but in the new notebook, I get a b c d and checking the notes in the new notebook, d is not listed in the tags field for any notes that I can see).

Sounds like a bug. However this can also be a result of a bug in an older version. It is possible that now the bug is fixed. I'l need further details here. It could be beneficial to switch to the "only used tags" filter, to see what's going on there.

I don't know what went wrong with the copy/paste, but something clearly did (unless CN is using its own clipboard, I don't think the Windows clipboard is robust enough to copy/paste between notebooks).

You're right, CN uses it's own clipboard format for copying/pasting between notebooks.

Edit #2: Sigh. Exported two notebooks as a test, and created a new notebook with two sections to hold them. Imported the first .xml file - discovered that CN sadly does not import the notes into the section you currently have open in your new notebook (which is what I would logically expect to happen), instead it just dumps them into a new section called 'main'. So you then have to move the newly imported notes to the relevant section before you import the next xml file (otherwise you will get your notes all mixed up with each other). Then, on the second xml file, CN only imported 420 notes - and there were 421 in the original xml file. I'm not going through that many notes one by one to try and work out which note it didn't import (and that would not tell me why it failed anyway). I give up, will just continue to use multiple notebooks and forget about trying to search them all.

Edit #3: Ran the export+import again just to test. CN warned of a duplicate record upon import, which is why it imported one less previously (logically, I guess this makes sense, but is still frustrating from a user perspective - in SQL form, each record will have a unique record ID even if the text contents are the same, whereas when you export this information is not included and thus when CN imports, it checks the text and decides that two records are the same, though there should be an option upon import to ignore duplicates). Regardless, I'm not going through 420 records to try and work out what record CN doesn't like, so will stick with multiple DB files.


Hmm. Ok, let's go from the start:
1) You don't really need to export to XML. Just import from .db directly
2) In the Import dialog, there's an option "Import sections", which you need to deselect if you want the imported notes to go into the currently active section.
3) In the Import dialog, there's an option "allow duplicates": https://yadi.sk/i/aqU5wJ5WjgCwD
Alex
User avatar
usbpoweredfridge
Posts: 410
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Multi Database Search

Postby usbpoweredfridge » Mon Oct 12, 2015 1:05 pm

CintaNotes Developer wrote:1) You don't really need to export to XML. Just import from .db directly


Thanks Alex, I will have another go at this by just using the import function directly - will post back here with the results.

CintaNotes Developer wrote:Sounds like a bug. However this can also be a result of a bug in an older version. It is possible that now the bug is fixed. I'l need further details here. It could be beneficial to switch to the "only used tags" filter, to see what's going on there.


It's also possible that I did something wrong. Thinking about it some more, I now have a recollection that after the copy+paste of all the notebooks into the new notebook, I may have performed a text clip from a webpage into CN. It is quite possible that I did this into the new notebook (the one that I had copied and pasted all the notes into), and not the old (original, single subject) notebook that I had intended. If I did in fact do that, I may have screwed up adding the tags to the new note, which would then quite likely throw the note and tag counts out (it would certainly make the note count one higher, and if I accidentally put two tags into the note instead of one, it would throw those out as well). I have done a bit of copying/pasting of notes before - usually only one at a time - and I have never had a problem, so I suspect it isn't a CN bug, but something that happened when I did that text clipping.

Anyway, will try the direct .db file import, and will see what happens.

Chris
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Multi Database Search

Postby CintaNotes Developer » Mon Oct 12, 2015 1:29 pm

Ok, thanks Chris, please keep me posted
Alex
gunars
Posts: 234
Joined: Fri Nov 08, 2013 5:35 am
Contact:

Re: Multi Database Search

Postby gunars » Mon Oct 12, 2015 3:18 pm

CintaNotes Developer wrote:3) In the Import dialog, there's an option "allow duplicates": https://yadi.sk/i/aqU5wJ5WjgCwD

Hi Alex,

I'm not an overly paranoid type, still, I'd prefer to see the original URL to an obscured one from Slovakia.

Gunars
User avatar
usbpoweredfridge
Posts: 410
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Multi Database Search

Postby usbpoweredfridge » Tue Oct 13, 2015 10:15 am

Ok, direct DB file import went a lot smoother. Encountered one bug (which I posted about in the bugs forum), and encountered one duplicate with one of my notebooks (rather than ticking the 'allow duplicates' option, I went into the other notebook and managed to track it down and delete it).

Just quickly checking the imported sections in the new notebook, the note totals seem to match, so for the moment, I am satisfied.

Chris
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Multi Database Search

Postby CintaNotes Developer » Tue Oct 13, 2015 3:35 pm

gunars wrote:
CintaNotes Developer wrote:3) In the Import dialog, there's an option "allow duplicates": https://yadi.sk/i/aqU5wJ5WjgCwD

Hi Alex,

I'm not an overly paranoid type, still, I'd prefer to see the original URL to an obscured one from Slovakia.

Gunars


That's just a screenshot hosted on Yandex.Disk, a russian analogue of Dropbox.
The .sk domain comes from them trying to be cool with the yadi.sk domain ;)
Alex
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Multi Database Search

Postby CintaNotes Developer » Tue Oct 13, 2015 3:50 pm

usbpoweredfridge wrote:Ok, direct DB file import went a lot smoother. Encountered one bug (which I posted about in the bugs forum), and encountered one duplicate with one of my notebooks (rather than ticking the 'allow duplicates' option, I went into the other notebook and managed to track it down and delete it).

Just quickly checking the imported sections in the new notebook, the note totals seem to match, so for the moment, I am satisfied.

Chris

Great to hear that. That bug that you reported will be fixed in the next update. Thanks Chris!
Alex

Return to “Feature Requests”