N.B. We apologise for the older video graphics presented, Please note the video content and tutorial is still very relevant to Boolean Operators in Lens.
In this tutorial we will focus on text searches using mainly boolean operators that will help you create more complex search queries in the Lens. Text searches use strings of key terms connected by boolean operators which must be in capital letters.
How to Use
To demonstrate the use of Boolean operators, suppose you are interested in methods to cure or treat cancer. You may start the search with just the word cancer or add more words using the operators
“AND treatment OR cure”. As you increase the number of words, you can start making subqueries and grouping them by additional operators such as parentheses. These will let the computer know how you want the search to be processed. You can add another operator
“NOT” malaria and process the search.
Operators & Fields
If for example, you want to search in specific fields such as Title, abstract, claims or full text, all you need to do is simply type the field you want to search in, add a colon and without any space, add the term. As the field will only apply to one term, if you want it applied across various terms, you would need to add parentheses to group multiple clauses to that field.
Let us take a more complex example such as this query:
Cancer AND (full_text:(Resistance OR tolerance) AND (Merck OR “CBA Pharma”)) OR (pub_date:20050905 TO 20130501)
While in this search we have not specified the field for the word cancer, however, we specified the field for these various other terms after we grouped them with parentheses and even used a range of dates within a new field “Publication date”. Please note here the use of yet another Boolean operator
“TO” here to indicate range of dates. Thus, when composing a more complex query, you can easily take advantage of several operators.
Now, if you are keen on searching a full exact phrase, you can simply type it between quotation marks ex:
full_text:"Treatment for Malaria and cancer". Note that the
“and” here is NOT a boolean operator and the quotation marks are straight and NOT curved.
For any question, please contact us at email@example.com or send your feedback to Feedback@support.lens.org