Sample search term query’s to search result through result search web part
- Search only document (i.e. all types but not docx type) under specific library
{searchTerms} Path:”document path” AND (NOT FileType:docx) AND IsDocument:True
with above query search result will not show folders.
- Search in specific site only
{searchTerms} Path:”site url”
Example: {searchTerms} Path:”https://abc.sharepoint.com/mstest/”
- Search result of specific Author with file type like docx, pdf
{searchTerms} Path:”site url” AND FileType:docx AND Author: User display name
{searchTerms} Path:”document path” AND FileType:docx AND Author:abc pqr
- Search document based on current user in specific library
{searchTerms} {User.Name} AND IsDocument:True AND Path:document path
- Search only document of specific folder
{searchTerms} Path:”Url of folder” AND IsDocument:True
{searchTerms} Path:”document path” AND IsDocument:True
- Search in all document library in site only
{searchTerms} contentclass:STS_List_DocumentLibrary AND Path:site url
- Search only item of sites.
{searchTerms} (contentclass:STS_ListItem OR IsDocument:True) AND Path:site url
- Search all sites.
{searchTerms} contentclass:STS_Web
- Search only list and library of particular site
{searchTerms} Path:site url AND (contentclass:STS_List OR contentclass:STS_List_DocumentLibrary)
- Serach only list and library
{searchTerms} (contentclass:STS_List OR contentclass:STS_List_DocumentLibrary)
- Search document in specific library on tag base
{searchTerms} Path:”document path” AND (owstaxidmetadataalltagsinfo:”tag name” OR owstaxidmetadataalltagsinfo:”tag name”)
OR
{searchTerms} IsDocument:true tag name2 tag name2 AND Path:”document path”
- Show search result based on file name
{searchTerms} filename:Finance.docx
- Show search result in specific document libarary
{?{searchTerms} Path: “document path” }
? – is use to avoid result on page load.