Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

Searching the KB using Boolean operators



Article ID: KB19246 KB Last Updated: 29 Jun 2011Version: 3.0
Information on how to use boolean operators in the KB search
Information on how to use boolean operators in the KB search
The expected behavior for the Boolean operators and their arguments is as follows:
  1. There are three Boolean operators: OR, AND, NOT. The NOT operator can also be written as AND NOT. They must be in all caps in the query.

  2. A query which does not contain a Boolean operator triggers a search on that string as described in (4) below.

  3. When an operator joins two arguments, the resulting phrase has the following interpretation:
    • a OR b: Retrieve all documents containing either a or b or both.
    • a AND b: Retrieve all documents containing both a and b.
    • a NOT b: Retrieve all documents containing a but not containing b.

  4. When a string of tokens is an argument for a Boolean operator, the string has the following properties:
    • A string with no double quotes is interpreted as both that string and any of its inflected forms.
    • A string with double quotes around it is interpreted as just that exact string. *[Note – we’ve customized this component so it is not as strict]
    • A string with multiple tokens is always interpreted as a unit; the individual tokens will not be taken into consideration when conducting the search.

It is also possible to use more than one Boolean operator in a single query, such as “a NOT b OR c”. In these cases the NOT operator takes precedence over AND and OR, while AND takes precedence over OR. Linear precedence does not influence operator precedence. Thus the queries below have the interpretations indicated by the parentheses:
x AND y NOT z = x AND (y NOT z)
x AND y OR z = (x AND y) OR z
x OR y NOT z = x OR (y NOT z)
x OR y AND z = x OR (y AND z)
x NOT y OR z = (x NOT y) OR z
x NOT y AND z = (x NOT y) AND z

Using explicit parentheses in a Boolean query will override the default precedence.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search