external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Executes an arbitrary search query against the SharePoint search index
Submit-PnPSearchQuery -Query <String>
[-StartRow <Int>]
[-MaxResults <Int>]
[-TrimDuplicates <Boolean>]
[-Properties <Hashtable>]
[-Refiners <String>]
[-Culture <Int>]
[-QueryTemplate <String>]
[-SelectProperties <String[]>]
[-RefinementFilters <String[]>]
[-SortList <Hashtable>]
[-RankingModelId <String>]
[-ClientType <String>]
[-HiddenConstraints <String>]
[-TimeZoneId <Int>]
[-EnablePhonetic <Boolean>]
[-EnableStemming <Boolean>]
[-EnableQueryRules <Boolean>]
[-SourceId <Guid>]
[-ProcessBestBets <Boolean>]
[-ProcessPersonalFavorites <Boolean>]
[-RelevantResults [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Submit-PnPSearchQuery -Query <String>
[-All [<SwitchParameter>]]
[-TrimDuplicates <Boolean>]
[-Properties <Hashtable>]
[-Refiners <String>]
[-Culture <Int>]
[-QueryTemplate <String>]
[-SelectProperties <String[]>]
[-RefinementFilters <String[]>]
[-SortList <Hashtable>]
[-RankingModelId <String>]
[-ClientType <String>]
[-HiddenConstraints <String>]
[-TimeZoneId <Int>]
[-EnablePhonetic <Boolean>]
[-EnableStemming <Boolean>]
[-EnableQueryRules <Boolean>]
[-SourceId <Guid>]
[-ProcessBestBets <Boolean>]
[-ProcessPersonalFavorites <Boolean>]
[-RelevantResults [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
PS:> Submit-PnPSearchQuery -Query "finance"
Returns the top 500 items with the term finance
PS:> Submit-PnPSearchQuery -Query "Title:Intranet*" -MaxResults 10
Returns the top 10 items indexed by SharePoint Search of which the title starts with the word Intranet
PS:> Submit-PnPSearchQuery -Query "Title:Intranet*" -All
Returns absolutely all items indexed by SharePoint Search of which the title starts with the word Intranet
PS:> Submit-PnPSearchQuery -Query "Title:Intranet*" -Refiners "contentclass,FileType(filter=6/0/*)"
Returns absolutely all items indexed by SharePoint Search of which the title starts with the word Intranet, and return refiners for contentclass and FileType managed properties
Automatically page results until the end to get more than 500. Use with caution!
Type: SwitchParameter
Parameter Sets: All
Required: False
Position: Named
Accept pipeline input: False
Specifies the name of the client which issued the query.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The locale for the query.
Type: Int
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specifies whether the phonetic forms of the query terms are used to find matches.
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specifies whether Query Rules are enabled for this query.
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specifies whether stemming is enabled.
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
-HiddenConstraints
The keyword query’s hidden constraints.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Maximum amount of search results to return. Default and max per page is 500 search results.
Type: Int
Parameter Sets: Limit
Required: False
Position: Named
Accept pipeline input: False
Determines whether Best Bets are enabled.
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Determines whether personal favorites data is processed or not.
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Extra query properties. Can for example be used for Office Graph queries.
Type: Hashtable
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Search query in Keyword Query Language (KQL).
Type: String
Parameter Sets: (All)
Required: True
Position: 0
Accept pipeline input: True
Specifies the query template that is used at run time to transform the query based on user input.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The identifier (ID) of the ranking model to use for the query.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The set of refinement filters used.
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The list of refiners to be returned in a search result.
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specifies whether only relevant results are returned
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The list of properties to return in the search results.
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The list of properties by which the search results are ordered.
Type: Hashtable
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specifies the identifier (ID or name) of the result source to be used to run the query.
Type: Guid
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Search result item to start returning the results from. Useful for paging. Leave at 0 to return all results.
Type: Int
Parameter Sets: Limit
Required: False
Position: Named
Accept pipeline input: False
The identifier for the search query time zone.
Type: Int
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specifies whether near duplicate items should be removed from the search results.
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
Type: WebPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False