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. But before, please remember that to save your searches in a private and secure workspace and export larger number of documents, you need to register for a free account and be logged in.
Text searches use strings of key terms connected by boolean operators which must be in capital letters. For a quick reference, you can view the search tips in this landing page, but for a more comprehensive guide, please check the “search Syntax” page in the support help center, link to additional help, and review a tutorial on how the boolean logic actually works. You can also browse some example queries.
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.
Please note that in this string of terms, we have not specified the field. 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.
you can find other special characters used as operators in the support pages (view the page). In the next tutorials we will discuss wildcard and proximity searches and as we continue to improve the documentation for the search syntax, we hope that this demo provides you with a core knowledge to start making sophisticated text-based queries.
For any question, please contact us at firstname.lastname@example.org or send your feedback to Feedback@support.lens.org