Skip to content

Commit

Permalink
Merge pull request #1983 from microsoft/dpaul-SearchFix
Browse files Browse the repository at this point in the history
Prevent Divide By Zero
  • Loading branch information
dpaulson45 authored Feb 9, 2024
2 parents aeb6b6b + cd9dd12 commit 32a7458
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ function Get-MailboxStatisticsOnDatabase {

if ($totalBigFunnelSearchableItems -ne 0) {
$fullIndexPercentage = [Math]::Round((($_.BigFunnelIndexedCount / $totalBigFunnelSearchableItems) * 100), 2)
$notPartIndexPercentage = [Math]::Round((($_.BigFunnelIndexedCount / ($totalBigFunnelSearchableItems - $_.BigFunnelPartiallyIndexedCount)) * 100), 2)
$divideBy = $totalBigFunnelSearchableItems - $_.BigFunnelPartiallyIndexedCount

if ($divideBy -ne 0) {
$notPartIndexPercentage = [Math]::Round((($_.BigFunnelIndexedCount / $divideBy) * 100), 2)
}
}

$mailboxStatisticsList.Add([PSCustomObject]@{
Expand Down

0 comments on commit 32a7458

Please sign in to comment.