Search Syntax
The basic Search Services syntax follows a number of rules. Terms can be logically grouped using the following operators:
Table 2-5 Search Syntax Operators
Syntax | Description |
---|---|
+ | AND |
- | NOT |
( ) | Parenthesis—Apply an operator to a group of keywords |
" " | Quotation marks—Search for the exact occurrence |
[ ] | Brackets—Search for a range value |
*, ? | Wild-card—Used in the middle or at the end of words to indicate any values in place of the * |
You can further restrict searches by searching for or excluding a specified category. The syntax for a category is of the form category:search_term
. Use quotation marks to search for exact strings in categories. Use AND and NOT operators to logically add or remove categories.
Examples
Search for documents containing sales but not oracle:
+sales –oracle
Search for documents containing the phrase radio sales:
"radio sales"
Search for documents containing sales but not oracle, or sales but not radio:
+sales –(oracle radio)
Search for documents containing the terms sales and oracle:
+sales +oracle
Search for documents containing the terms rent and sales or rent and oracle:
+rent +(sales oracle)
(+rent +sales) (+rent +oracle)
Search for documents that have a file name starting with revenue but are not in the Sample Content folder:
+FileName:revenue* -Path:"Sample Content"
Search for documents modified in the date range 15th Dec 2007 and 21st Dec 2007
+LastModifiedDate:[2007-12-15 TO 2007-12-21]
Search for documents modified in 2007
+LastModifiedDate:[2007]
Search for documents modified in December 2007
+LastModifiedDate:[2007-12]