Wednesday, November 7, 2012

Microsoft AQS - Advanced Query Syntax

** Source: http://msdn.microsoft.com/en-us/library/aa965711%28v=vs.85%29.aspx
Query Syntax: store:<data store>
Restrict Search by Data Store Use Example
Desktop desktop store:desktop
Files files store:files
Outlook outlook store:outlook
Outlook Express oe store:oe
Specific Folder foldername or in foldername:MyDocuments or in:MyDocuments
     
Query Syntax: <value> <operator> <value>
Keyword/Symbol Examples Function
NOT social NOT security Finds items that contain social, but not security.
social –security Finds items that contain social, but not security.
OR social OR security Finds items that contain social or security.
Quotation marks "social security" Finds items that contain the exact phrase social security.
Parentheses (social security) Finds items that contain social and security in any order.
> date:>11/05/04 Finds items with a date after 11/05/04.
size:>500 Finds items with a size greater than 500 bytes.
< date:<11/05/04 Finds items with a date before 11/05/04.
size:<500 Finds items with a size less than 500 bytes.
.. date:11/05/04..11/10/04 Finds items with a date beginning on 11/05/04 and ending on 11/10/04.
Query Syntax: <value> <property>
Boolean Property Example Function
is:attachment report is:attachment Finds items that have attachments that contain report. Same as isattachment:true.
isonline: report isonline:true Finds items that are online and which contain report.
isrecurring: report isrecurring:true Finds items that are recurring and which containreport.
isflagged: report isflagged:true Finds items that are flagged (Review, Follow up, for example) and which contain report.
isdeleted: report isdeleted:true Finds items that are flagged as deleted (Recycle Bin or Deleted Items, for example) and which contain report.
iscompleted: report iscompleted:false Finds items that are not flagged as complete and which contain report.
hasattachment: report hasattachment:true Finds items containing report and having attachments
hasflag: report hasflag:true inds items containing report and having flags.
Query Syntax: kind:everything <property>:<value>
To Restrict by File Type: Use Example
All file types everything kind:everything
Communications communications kind:communications
Contacts contacts kind:contacts
E-mail email kind:email
Instant Messenger conversations im kind:im
Meetings meetings kind:meetings
Tasks tasks kind:tasks
Notes notes kind:notes
Documents docs kind:docs
Text documents text kind:text
Spreadsheets spreadsheets kind:spreadsheets
Presentations presentations kind:presentations
Music music kind:music
Pictures pics kind:pics
Videos videos kind:videos
Folders folders kind:folders
Folder name foldername or in foldername:mydocs or in:mydocs
Favorites favorites kind:favorites
Programs programs kind:programs
Query Syntax: see below
Dates Relative to: Syntax Example Result
Day date:today Finds items with today's date.
date:tomorrow Finds items with tomorrow's date.
date:yesterday Finds items with yesterday's date.
Week/Month/year date:this week Finds items with a date falling within the current week.
date:last week Finds items with a date falling within the previous week.
date:next month Finds items with a date falling within the upcoming week.
date:past month Finds items with a date falling within the previous month.
date:coming year Finds items with a date falling within the upcoming year.
Query Syntax: kind:everything <property>:<value>
Property Use Example
Title title, subject or about title:"Quarterly Financial"
Status status status:complete
Date date date:last week
Date modified datemodified or modified modified:last week
Importance importance or priority importance:high
Size size size:> 50
Deleted deleted or isdeleted isdeleted:true
Is attachment isattachment isattachment:true
To to or toname to:bob
Cc cc or ccname cc:john
Company company company:Microsoft
Location location location:"Conference Room 102"
Category category category:Business
Keywords keywords keywords:"sales projections"
Album album album:"Fly by Night"
File name filename or file filename:MyResume
Genre genre genre:rock
Author author or by author:"Stephen King"
People people or with with:(sonja or david)
Folder folder, under or path folder:downloads
File extension ext or fileext ext:.txt
Query Syntax: kind:attachment <property>:<value>
Property Use Example
People people or with people:john or with:john
Query Syntax: kind:contacts <property>:<value>
Property Use Example
Job title jobtitle jobtitle:CFO
IM address imaddress imaddress:john_doe@msn.com
Assistant's phone assistantsphone assistantsphone:555-3323
Assistant name assistantname assistantname:Paul
Profession profession profession:plumber
Nickname nickname nickname:Tex
Spouse spouse spouse:Debbie
Business city businesscity businesscity:Seattle
Business postal code businesspostalcode businesspostalcode:98006
Business home page businesshomepage businesshomepage:www.microsoft.com
Callback phone number callbackphonenumber callbackphonenumber:555-555-2121
Car phone carphone carphone:555-555-2121
Children children children:Timmy
First name firstname firstname:John
Last name lastname lastname:Doe
Home fax homefax homefax:555-555-2121
Manager's name managersname managersname:John
Pager pager pager:555-555-2121
Business phone businessphone businessphone:555-555-2121
Home phone homephone homephone:555-555-2121
Mobile phone mobilephone mobilephone:555-555-2121
Office office office:sample
Anniversary anniversary anniversary:1/1/06
Birthday birthday birthday:1/1/06
Web page webpage webpage:www.microsoft.com
Query Syntax: kind:communications <property>:<value>
Property Use Example
From from or organizer from:john
Received received or sent sent:yesterday
Subject subject or title subject:"Quarterly Financial"
Has attachment hasattachments, hasattachment hasattachment:true
Attachments attachments or attachment attachment:presentation.ppt
Bcc bcc, bccname or bccaddress bcc:dave
Cc address ccaddress or cc ccaddress:john_doe@hotmail.com
Follow-up flag followupflag followupflag:2
Due date duedate or due due:last week
Read read or isread is:read
Is completed iscompleted is:completed
Incomplete incomplete or isincomplete is:incomplete
Has flag hasflag or isflagged has:flag
Duration duration duration:> 50
Query Syntax: kind:calendar <property>:<value>
Property Use Example
Recurring recurring or isrecurring is:recurring
Organizer organizer, by or from organizer:debbie
Query Syntax: kind:documents <property>:<value>
Property Use Example
Comments comments comments:"needs final review"
Last saved by lastsavedby lastsavedby:john
Document manager documentmanager documentmanager:john
Revision number revisionnumber revisionnumber:1.0.3
Document format documentformat documentformat:MIMETYPE
Date last printed datelastprinted datelastprinted:last week
Query Syntax: kind:presentation <property>:<value>
Property Use Example
Slide count slidecount slidecount:>20
Query Syntax: kind:music <property>:<value>
Property Use Example
Bit rate bitrate, rate bitrate:192
Artist artist, by or from artist:John Singer
Duration duration duration:3
Album album album:"greatest hits"
Genre genre genre:rock
Track track track:12
Year year year:> 1980 < 1990
Query Syntax: kind:picture <property>:<value>
Property Use Example
Camera make cameramake cameramake:sample
Camera model cameramodel cameramodel:sample
Dimensions dimensions dimensions:8X10
Orientation orientation orientation:landscape
Date taken datetaken datetaken:yesterday
Width width width:1600
Height height height:1200
Query Syntax: kind:video <property>:<value>
Property Use Example
Name name, subject name:"Family Vacation to the Beach 05"
Ext ext, fileext ext:.avi

No comments:

Post a Comment