I'm running a FullTextSqlQuery where TrimDuplicates
is set to true
and have been searching for days on why certain items are not in the results. I just found out today that the result appears when I set TrimDuplicates=false
.
Is this a known SharePoint search bug?
My code is simple:
using (var fullTextSqlQuery = new FullTextSqlQuery(_searchServiceApplicationProxy))
{
fullTextSqlQuery.QueryText = querytext;
fullTextSqlQuery.ResultsProvider = SearchProvider.Default;
fullTextSqlQuery.TrimDuplicates = true;
fullTextSqlQuery.EnableStemming = true;
fullTextSqlQuery.EnableNicknames = true;
fullTextSqlQuery.IgnoreAllNoiseQuery = true;
fullTextSqlQuery.ResultTypes |= ResultType.RelevantResults;
if (pageSize.HasValue && pageSize.Value > 0)
{
fullTextSqlQuery.RowLimit = pageSize.Value;
fullTextSqlQuery.TotalRowsExactMinimum = pageSize.Value;
if (selectedPage.HasValue && selectedPage.Value > 0)
fullTextSqlQuery.StartRow = (selectedPage.Value - 1) * pageSize.Value;
}
searchResults = fullTextSqlQuery.Execute();
}
Thanks in advance for your answers.