Microsoft KB Archive/937775

= A document library or a list is not returned in the search results when you use an SQL query to sort search results in SharePoint Server 2007 =

Article ID: 937775

Article Last Modified on 6/14/2007

-

APPLIES TO


 * Microsoft Office SharePoint Server 2007

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
Consider the following scenario. You use an SQL query to search for content in a document library or in list in Microsoft Office SharePoint Server 2007. The SQL query uses the ORDER BY clause to sort the search results by a property or by a column. However, the document library or the list is not returned in the search results. You experience this symptom even though the document library or the list contains the content for which you are searching.



CAUSE
This problem occurs if the document library or the list does not have a value that is defined for the property or for the column that is specified in the ORDER BY clause. For example, this issue occurs if the following conditions are true:
 * The SQL query uses the ORDER BY clause to sort the search results by description.
 * The document library or the list does not have a description. That is, the value of the Description column for the document library or for the list is null.



How to obtain the hotfix
This issue is fixed in the SharePoint Server 2007 Hotfix Package that is dated May 15, 2007. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

937208 Description of the SharePoint Server 2007 hotfix package: May 15, 2007

Enable the hotfix
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To enable the hotfix after you apply it, add the OuterJoinDocPropsOnSorting registry entry to the following registry subkey, and then set the value of the registry entry to 1:

To do this, follow these steps:  Click Start, click Run, type cmd in the Open box, and then click OK. Click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\ \Query

 On the Edit menu, point to New, and then click DWORD Value. Type OuterJoinDocPropsOnSorting, and then press ENTER. Right-click OuterJoinDocPropsOnSorting, and then click Modify. Type 1 in the Value data box, and then click OK.</li> On the File menu, click Exit to exit Registry Editor.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: moss moss2007 empty field execute

Keywords: kbmoss2007postrtmfix kbhotfixserver kbqfe kbbug kbfix kbpubtypekc KB937775

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.