Searching with text and tags

gunars
Posts: 234
Joined: Fri Nov 08, 2013 5:35 am
Contact:

Searching with text and tags

Postby gunars » Mon Jun 12, 2017 9:47 pm

Hi Alex

Can you please describe how the search box works when using both regular search words and tags? Also, what exactly does Enter do at that point.

Here is a test example: I created 5 test notes with the tag 'horse'. Of those 5 notes, three of them also contained a phrase "Here is a horse" in the body of the note. If it makes a difference, I have tagsedit.autocomplete.searchbox.acceptonspace = 0. SIW and across fields is also off.

1) If I search 'Anywhere', and type 'horse' or pick the suggested horse tag, I get 5 notes. OK

2) However, if I search "Any Text Field' and type 'horse' or select the suggested horse tag, I only get the 3 notes that actually have a horse in the body of the note. I expected all 5 since it should have hit the tags also. But if I hit Enter after that, I get all 5 notes.

3) If I search "Text and Title" and type "horse", I get the 3 notes that have 'horse' in the body. That's what I expect since I'm not searching the Tags field. But if I then hit Enter, I get all 5 notes, including the ones that have a horse tag even though they don't have a horse in the body. Hitting Enter appears to select the 'horse' tag and then display all messages with this tag. That seems to be what's happening in example 2 also. Is that the way it's intended? I'm not complaining or suggesting it should do something different (yet :-) ). I'm just trying to form a mental model of how it works.

Maybe this was described in earlier conversations on this board, but there are 11k+ messages here now (that's a good thing ;) ) and I couldn't find it. It would be good to add info like this to the Help, maybe as an appendix of technical topics to not complicate the more general descriptions. At the least, the help should mention that you can select a set of notes with tags and then do a search that will narrow down from the selected set.

btw, Print is not mentioned at all in the help. I went looking for it when I tried to Print and nothing happened (because I had deleted a printer and didn't have any default printer set).

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

Re: Searching with text and tags

Postby CintaNotes Developer » Tue Jun 13, 2017 6:51 am

Hi Gunars,

gunars wrote:2) However, if I search "Any Text Field' and type 'horse' or select the suggested horse tag, I only get the 3 notes that actually have a horse in the body of the note. I expected all 5 since it should have hit the tags also. But if I hit Enter after that, I get all 5 notes.


Only free-form text fields, namely Title, Text (Body) and Remarks are considered as text fields by CN. Tags and Link are not included here. This is why you got only 3 notes that contained "horse" in the body.

When you pressed Enter however, you told CintaNotes "please look into my search field and if you find any tags there, turn them into a tag selection" (this is how you operate tag sidebar using only the keyboard BTW, more info here). CN found tag "hourse" and applied it as current tag filter. That's why you got all 5 notes tagged with the "horse" tag afterwards.

gunars wrote:3) If I search "Text and Title" and type "horse", I get the 3 notes that have 'horse' in the body. That's what I expect since I'm not searching the Tags field. But if I then hit Enter, I get all 5 notes, including the ones that have a horse tag even though they don't have a horse in the body. Hitting Enter appears to select the 'horse' tag and then display all messages with this tag. That seems to be what's happening in example 2 also. Is that the way it's intended? I'm not complaining or suggesting it should do something different (yet :-) ). I'm just trying to form a mental model of how it works.


Yes, as I said, Enter in the search box is shorthand for selecting tags on the tag sidebar. Note that you can also use Ctrl+Enter, Alt+Enter and Shift+Enter to mimic Ctrl-, Alt- and Shift- clicks on tags. This was described in the newsletter and blog article 5 More Hidden Features for Better Productivity. Once you get the hang of it, it is actually very convenient.
This also allows you to select a set of tags and search within it in one swoop, simply by typing the search text and all tags in the search box and pressing Enter.

Maybe this was described in earlier conversations on this board, but there are 11k+ messages here now (that's a good thing ;) ) and I couldn't find it. It would be good to add info like this to the Help, maybe as an appendix of technical topics to not complicate the more general descriptions. At the least, the help should mention that you can select a set of notes with tags and then do a search that will narrow down from the selected set.


It is mentioned on the Keyboard Shortcuts page, but probably you're right and we should address this more closely in help.

btw, Print is not mentioned at all in the help. I went looking for it when I tried to Print and nothing happened (because I had deleted a printer and didn't have any default printer set).

You're right, we forgot to add this section. Thanks for reminding me.
Alex
gunars
Posts: 234
Joined: Fri Nov 08, 2013 5:35 am
Contact:

Re: Searching with text and tags

Postby gunars » Tue Jun 13, 2017 2:32 pm

Thanks for the explanation, Alex. I had forgotten about the Keyboard and Mouse shortcuts description page. Maybe you could refer to it at the bottom of the help page.

Only free-form text fields, namely Title, Text (Body) and Remarks are considered as text fields by CN. Tags and Link are not included here.


In that case, you might want to change the Help section for search modes that says:
Any Text Field -- Search in any of the following fields: Title, Text, Tags or Remarks.

That's why I was expecting the tag results also.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Searching with text and tags

Postby CintaNotes Developer » Tue Jun 20, 2017 8:23 am

gunars wrote:Thanks for the explanation, Alex. I had forgotten about the Keyboard and Mouse shortcuts description page. Maybe you could refer to it at the bottom of the help page.


This is a good idea. Done.

In that case, you might want to change the Help section for search modes that says:
Any Text Field -- Search in any of the following fields: Title, Text, Tags or Remarks.

That's why I was expecting the tag results also.


Indeed, the Help text is in error here. Have already fixed that.
Alex

Return to “CintaNotes Personal Notes Manager”