In command search, you can specify and perform more complex searches than you can using structured advanced search. You can use many search terms and a variety of search operators, and you can control the order in which to evaluate expressions.
You create more complex queries using command search by joining search expressions with logical operators and using parentheses to group and prioritize parts of the query. Although parentheses are not always required, they help you to see the structure of your query more clearly, and may make it easier for you to edit the query.
Here is an example of a more complex query:
(gasoline NOT diesel) AND hybrid electric AND vehicle
This query first looks for documents containing the word gasoline but not the word diesel. It then looks in those documents for the words electric and hybrid either singly or as a phrase, plus the word vehicle, and presents the results. Although the parentheses are not necessary, they make it easier to create and read search expressions.
Here is an example of a more complex query where parentheses are necessary:
(UAV OR ”unmanned aerial vehicle”) AND (”trajectory tracking” OR ”target tracking”)
By placing your search terms and operators within parentheses, it designates the order in which they are processed.
In command search, you have access to two proximity operators, NEAR and ONEAR, which cannot be used in the default advanced search. Here is an example of a complex query using NEAR:
("hybrid electric vehicle" NEAR/10 "plug-in") OR (HEV NEAR/10 "plug-in").
This query looks for documents containing the phrase hybrid electric vehicle or the abbreviation HEV within 10 words of the phrase plug-in. The search terms may occur in any order in metadata.
The ONEAR operator specifies an ordered proximity search:
("hybrid electric vehicle" ONEAR/10 "plug-in") OR (HEV ONEAR/10 "plug-in").
This query also looks for documents containing the phrase hybrid electric vehicle or the abbreviation HEV within 10 words of the phrase plug-in, but hybrid electric vehicle or HEV must occur before (that is, to the left of) plug-in.
Operators must be in all capital letters (AND, OR, NOT, NEAR, ONEAR).
The * wildcard cannot be used within quotation marks or with the proximity operators (NEAR, ONEAR).
If a term used with a proximity operator has a non-alphanumeric character such as a hyphen (i.e. plug-in), it should be treated as a phrase and placed within quotation marks. For example, "plug-in".
You may specify up to 15 search terms. The words within phrases are counted separately so a phrase consisting of three words such as "fiber bragg grating" would count as three search terms.
When using the proximity operators you are limited to one term or phrase on either side of the proximity operator. Thus (computer or PC) NEAR/3 monitor is not a valid search; use (computer NEAR/3 monitor) OR (PC NEAR/3 monitor) instead.
Nesting Search Operations