Jump to content

Smart Search Syntax - 'or' functionality


Recommended Posts

I'm trying to create a smart search that will return any notes that match a particular tag OR are in a specific notebook

 

Using any: notebook:"Read & Review" tag:Read

 

- this seems to be the right syntax but when used as a search it gets changed into All notebooks matching Any of : contains words starting with notebook contains the words "Read & Review" tagged with Review

 

Am I missing something or is this simply not possible using EN current syntax?

 

Link to comment
  • Level 5

I'm trying to create a smart search that will return any notes that match a particular tag OR are in a specific notebook

 

Using any: notebook:"Read & Review" tag:Read

 

- this seems to be the right syntax but when used as a search it gets changed into All notebooks matching Any of : contains words starting with notebook contains the words "Read & Review" tagged with Review

 

Am I missing something or is this simply not possible using EN current syntax?

 

When you look at the Formal Search Grammar you can see that the notebook can not be part of the things that can be put after 'any:' but can only be the first part of a search:

 

search = [ notebook, seperator ],

               [ "any:", separator ] ,

               term,

               { separator , term } ;

 

'notebook' can not be part of 'term'.

Link to comment
  • Level 5*

You really can't use an OR operator with EN search. 

 

A workaround to solve your search would be to add a tag to every note in the notebook in question and then do an AND search for that tag and the READ tag, with a context of All Notes.  Or just add the READ tag to all notes in the notebook, if they mean the same thing to you. 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...