Tamago-DB supports rich boolean search terms, similar to many popular search engines.


Boolean operators allow terms to be combined through logic operators. Tamago-DB's boolean search implementation supports AND, "+", OR, NOT and "-" as Boolean operators. Note that textual Boolean operators must be ALL CAPS.


OR

 

The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.


To search for documents that contain either "recruitment database" or just "recruitment" use the query:

 

"recruitment database" recruitment

 or

"recruitment database" OR recruitment


AND


The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.


To search for documents that contain "recruitment database" and "multilingual" use the query:


"recruitment database" AND "multilingual"


+ (plus)


The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

To search for documents that must contain "recruitment" and may contain "database" use the query:


+recruitment database


NOT


The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.


To search for documents that contain "recruitment database" but not "mojibake" use the query:


"recruitment database" NOT "mojibake"


Note that the NOT operator cannot be used with just one term. For example, the following search will return no results:


NOT "recruitment database"


- (minus)


The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.


To search for documents that contain "recruitment database" but not "mojibake" use the query:


"recruitment database" -mojibake


Grouping


Tamago-DB supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.


To search for either "recruitment" or "apache" and "website" use the query:


(recruitment OR apache) AND website


This eliminates any confusion and makes sure you that website must exist and either term "recruitment" or "apache" may exist.


Boolean for Tags (Contextual search)


Users can use the following prefix tag: to search specifically for tags.  Using the prefix tag: within your boolean search will allow you to have the same search ability specifying only the tags.  For example, you may want to search all the records in Tamago-DB that have a "project manager" and "IT" tag, but not the tags "pharma".  You would conduct the search as follows:


tag:"project manager" AND tag:IT NOT tag:pharma


The results from this search would contain all the records tagged with "project manager" and "IT", but excludes the records that are tagged "pharma". 


Using the prefix tag: with any of the above boolean operators will enhance advance searching with tags.