Query class

NOTE: This API is now obsolete.

Provides the base class for executing search queries using the Search query object model. This class defines properties and methods that are shared by the FullTextSqlQuery and KeywordQuery classes.

Inheritance hierarchy


Namespace:  Microsoft.SharePoint.Search.Query
Assembly:  Microsoft.SharePoint.Search (in Microsoft.SharePoint.Search.dll)


<ObsoleteAttribute("This class is obsolete.")> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public MustInherit Class Query _
    Implements IDisposable
Dim instance As Query
[ObsoleteAttribute("This class is obsolete.")]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public abstract class Query : IDisposable


The Query class is not intended to be used directly from your code, but is designed to be the base implementation for the Search query object model classes.

Instead, you should use the FullTextSqlQuery class for executing SQL syntax search queries, or the KeywordQuery class for executing Keyword syntax search queries.

For more information about the query object model for Search, see Query Object Model.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also


Query members

Microsoft.SharePoint.Search.Query namespace