0

Issue: The Search page sometimes returns 0 or some results when searching for the same keyword. The 0 results usually happen after a while from the last search or once the crawl is finished. I finally get results after few minutes of hitting the Search button. From that moment the Search page works fine until another break or crawl. There are no errors in the crawl log. The content account and the users have access to the file share.

Investigation: I've discovered in the SQL Server Profiler that there's a slight difference in a query when there are 0 or some results.

0 results:

exec sp_executesql N'/* {70D7D737-59E2-4B08-8204-01626BD4799D} */ exec dbo.proc_MSS_GetMultipleResults @P1,@P2,@P3,@P4,@P5',N'@P1 int,@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 varbinary(8000)',-2147483647,N'hotmail',N'',N'SET NOCOUNT ON ; DECLARE @joinRows INT ; SET @joinRows = DATALENGTH(@joinData) / 8 ;;WITH DocIds(DocId, Value) AS ( SELECT TOP(@joinRows) CAST(SUBSTRING(@joinData, ((ord.n-1)*8) + 1, 4) AS INT), CAST(SUBSTRING(@joinData, ((ord.n-1)*8) + 5, 4) AS INT) FROM dbo.MSSOrdinal AS ord WITH(NOLOCK) WHERE ord.n <= @joinRows ) SELECT P.DocId, P.SummaryBlobSize, P.Size, P.LastModified, P.IsDocument, P.IsPictureUrl, P.Author, P.Title, P.Url, P.PictureThumbnailUrl, P.ContentClass, P.FileExtension, P.Tags, P.PropertyBlob, CASE WHEN P.PropertyBlob IS NULL THEN 0 ELSE DATALENGTH(P.PropertyBlob) END, P.PopularSocialTags, P.SiteName, P.Description, P.ParentLink, P.NumberOfMembers, P.PictureHeightAndWidth, P.DisplayDate FROM dbo.MSSDocResults AS P WITH(NOLOCK), DocIds AS T WHERE P.DocId = T.DocId OPTION (MAXDOP 1) ',0x

Some results:

exec sp_executesql N'/* {FF84415D-C7AE-46BF-A19B-5D24F4926235} */ exec dbo.proc_MSS_GetMultipleResults @P1,@P2,@P3,@P4,@P5',N'@P1 int,@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 varbinary(8000)',-2147483647,N'hotmail',N'',N'SET NOCOUNT ON ; DECLARE @joinRows INT ; SET @joinRows = DATALENGTH(@joinData) / 8 ;;WITH DocIds(DocId, Value) AS ( SELECT TOP(@joinRows) CAST(SUBSTRING(@joinData, ((ord.n-1)*8) + 1, 4) AS INT), CAST(SUBSTRING(@joinData, ((ord.n-1)*8) + 5, 4) AS INT) FROM dbo.MSSOrdinal AS ord WITH(NOLOCK) WHERE ord.n <= @joinRows ) SELECT P.DocId, P.SummaryBlobSize, P.Size, P.LastModified, P.IsDocument, P.IsPictureUrl, P.Author, P.Title, P.Url, P.PictureThumbnailUrl, P.ContentClass, P.FileExtension, P.Tags, P.PropertyBlob, CASE WHEN P.PropertyBlob IS NULL THEN 0 ELSE DATALENGTH(P.PropertyBlob) END, P.PopularSocialTags, P.SiteName, P.Description, P.ParentLink, P.NumberOfMembers, P.PictureHeightAndWidth, P.DisplayDate FROM dbo.MSSDocResults AS P WITH(NOLOCK), DocIds AS T WHERE P.DocId = T.DocId OPTION (MAXDOP 1) ',0x0000002C00000000

Please check end of the query. For 0 results the varbinary value seems to be incomplete. Any ideas why this is happening?

  • You mentioned file share - is it only having this issue with results from that source or all sources? – Jesus Shelby Sep 4 '15 at 15:45
  • It happens for all sources. – jambis Sep 7 '15 at 10:11
0

I did some additional research and found an error in the log file

AuthzInitializeContextFromSid failed with ERROR_ACCESS_DENIED. This error indicates that the account under which this process is executing may not have read access to the tokenGroupsGlobalAndUniversal attribute on the querying user's Active Directory object. Query results which require non-Claims Windows authorization will not be returned to this querying user.

which led me to the solution. It turns out that the Search Server 2010 doesn't work well in a multi-domain environment. I followed these two links which solved my problem.

one-way trust between domains

the fix

  • Ah yes - that was a crucial bit of information ;) - glad you got it working. – Jesus Shelby Sep 12 '15 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.