Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $item = Get-Item .
- $options = @{}
- [Sitecore.ContentSearch.ContentSearchManager]::Indexes | Foreach-Object { $options.Add($_.Name, $_.Name) }
- $props = @{
- Parameters = @(
- @{Name="indexName"; Title="Choose an index"; Options=$options; Tooltip="Choose one."}
- )
- Title = "Index selector"
- Description = "Choose an index."
- Width = 300
- Height = 300
- ShowHints = $true
- }
- $result = Read-Variable @props
- if ($result -eq "ok") {
- $indexName
- $index = [Sitecore.ContentSearch.ContentSearchManager]::GetIndex($indexName)
- [Sitecore.ContentSearch.Maintenance.IndexCustodian]::Refresh($index, [Sitecore.ContentSearch.SitecoreIndexableItem]$item)
- }
- Close-Window
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement