Complex Command Search Examples
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.
Using logical operators and parentheses:
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.
Using proximity operators:
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.