【question】
We often search for a very long word, such as "International Cooperation Bank", and the corresponding search results will find anything related to "International", "Cooperation" and "Bank". Such behavior is a word segmentation, so how do you know How is the word segmentation in the search?
【Solution】
Use powershell to do it. E.g:
$query = "Bank for International Cooperation" $ lcid = 1041 $ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application" $queryInternal = New-Object Microsoft.Office.Server.Search.Query.KeywordQueryInternal($ssa) $culture = New-Object "System.Globalization.CultureInfo" $lcid $queryInternal.QueryProperties.Culture = $culture $wordBreaker = $queryInternal.CreateWordBreaker($false) $wordBreaker.BreakText($query) foreach($tokens in $wordBreaker.GetTokens()) { foreach($token in $tokens) { Write-Host $query.Substring($token.SrcPos,$token.SrcLen) } }