Understanding Mixed Logic Queries




[Home] [Updates] [GTD] [Mac Users] [Sample Searches] [Tips & Tricks] [Privacy Policy] [Windows 8] [User Quotes]

Understanding AND/OR search queries in BitQwik

BitQwik can handle mixed logic queries!

PREFACE: This web page is a bit long and detailed and except for the tips section is meant for power users. It is not necessary to read this entire page to use BitQwik’s mixed logic search features but please make sure you do read these important tips

Experienced Evernote users have wanted mixed logic queries for a long time now.  Currently, when you create a search query for Evernote, it either has to be of the type Match ALL (AND) or Match Any (OR).  Said differently it had to be one or the other of the two match styles below:

  • Match ALL: Every single search condition you specify in a search query must be satisfied for a note to be included in your search results
  • Match Any: At least one search condition out of the ones you specify must be satisfied but as long as that happens, the other search conditions need not be met.

For example, if you created a search that had the following conditions:

  • “Created yesterday”
  • “That has Wimbledon in the title”

Then every note in the search results would need to have been created yesterday AND have Wimbledon in the title for a Match ALL search.  On the other hand, for a Match Any search then a note could have been created yesterday OR could have Wimbledon in the title to end up in the search results.

But before BitQwik you could not do a search like “Created yesterday AND has Wimbledon OR Hollywood in the title”.  (Note: I am capitalizing AND & OR for emphasis, it is not a requirement when creating BitQwik queries).

BitQwik changes all that!

With BitQwik you can do these kinds of searches that you can not do with Evernote by itself:

  • Search queries that mix AND & OR logic in the same query
  • Have multiple Notebooks in the same query
  • Exclude notes that belong to one or more Notebooks

This web page will help you fix search queries that have mixed logic and are not doing what you want by explaining how BitQwik processes a mixed logic query.

First a quick glossary of terms. Note, search terms are italicized for clarity:

    FILTER: A filter is applied to all your search results.  Think of it as a net that screens out unwanted notes from your search that is applied before all other search conditions are applied. A filter is created whenever you use a phrase like the following that starts with language that indicates you don’t want certain notes in your search results:

    • Leave out notes I created last week
    • Don’t include notes that have monkeys in the title”
    • I don’t want notes that I created last week and are encrypted or have monkeys in the title”

    This is different than a search condition that uses the word not in it since that only eliminates notes from the current search condition instead of being applied to all search results. For example:

    • “Tagged with blue but not green”
    • Notes that I created last week and have monkeys in the title but do not have funny in the title”

    CONJUNCTION: A conjunction is the use of “and” or “orembedded in a list of search terms.  For example:

    • “Tagged with blue or green
    • “Notes that have web pages, clipped, and urgent in the title”

    CONJOIN: In contrast, a conjoin is the use of “and” or “or” in a manner that joins search conditions together.  For example:

    • “Tagged with blue or green AND have concert tickets, clipped, and urgent in the title”

 Combined example that demonstrates the glossary terms:

    Take a look at the following complex search query that is perfectly valid in BitQwik. Again, the words AND & OR are capitalized for emphasis when used as conjoins (conjunctions are bolded but not capitalized).  You do not have to capitalize them in BitQwik when entering a query :

    “Show me notes tagged with blue but not green OR have monkeys, apple, or yellow in the title AND were created yesterday. Leave out notes that were clipped from the web.”

    The capitalized and bolded words in this case are conjoins since they join search conditions together and the lowercase and bolded words are conjunctions since they are embedded in a search terms list.  The word not is also bolded.  Here is what you would see in your search results after executing this query:

  • Notes that carry the tag blue but are not tagged with green but only if they were not clipped from the web.
  • You would also see notes that have the search terms monkeys, apple, or yellow in the title if they were created yesterday but only if they were not clipped from the web.

As you can see when the word not is embedded in a search condition, it only excludes notes affected by the search condition it is linked to.  In the above example that notes that are tagged with blue are included in the search results but only if they do not also have the tag green. However, notes that have monkeys, apple, or yellow in the title and were created yesterday could be tagged with green and they would still be included in the search results. The “not tagged with green” restriction does not apply to that search condition, only to the “tagged with blue” search condition since it is linked to it in the query by being next to it.

In contrast, using the above search query example, all notes must not be clipped from the web in this search since that condition was stated as a FILTER and FILTERs apply to all notes in a query. Any notes matching the FILTER will be excluded regardless of the other search conditions as illustrated above.


  1. Do not use AND as ALSO, use OR instead!

    If you say “show me notes tagged with red and blue” then a note would have to have both the tags red and blue to be included in your search results. If it only had red or only had blue as a tag it would not be included in your search results. If you want notes that either have red or blue (or both) then you should say “show me notes tagged with red or blue”.
  2. Avoid NOT when what you really want to do is FILTER!

    When combining AND & OR logic and negation (NOT), the logic can become ambiguous and it becomes easy to get search results that are not what you want.  There’s a really easy way to avoid this and that is to FILTER.  Take this complex phrase as an example:

    “Show me notes that are tagged with lemons OR melons but not pie, cake OR pudding”

    Instead, simplify it by changing it to:

    “Show me notes tagged with lemons OR melons. Leave out notes tagged with pie, cake or pudding
  3. Troubleshooting searches with the Search Details report

    When you enter a mixed logic search BitQwik automatically detects it.  If you are having trouble getting the search results you want, click on the Tab that says Search Details. You will see that tab on the form that shows you the results of your mixed logic search.  It will tell you how BitQwik interpreted your query and what Evernote searches and filtering operations it executed behind the scenes. If your search query contains a FILTER, then that will be shown at the top of the explanation. Then you will see one or more Search Groups.  The search results from each Search Group, after being filtered by the FILTER, are combined into the full list of search results you see as a result of your query.

    Here is an example of a Search Details report for the query “Show me notes that I created this year that have Skype in the title or Microsoft in the title. Leave out notes that are contain completed tasks.”

  4. General keywords are applied to the entire search

    Keywords entered into the general keywords entry boxes are also applied to the entire search, just like filters.  Below is a screen shot of the general keyword entry box:


That’s it. If you have any questions please join us on the forum thread dedicated to BitQwik questions and comments.



Contact Us





SourceForge.net Logo 

(c) 2005 - 2012, Android Technologies, Inc.