Share via


Query.QueryText property

The query text of the search query.

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

Syntax

'Declaration
Public Property QueryText As String
    Get
    Set
'Usage
Dim instance As Query
Dim value As String

value = instance.QueryText

instance.QueryText = value
public string QueryText { get; set; }

Property value

Type: System.String
A string containing the query text.

Exceptions

Exception Condition
FaultException

A value was not specified.

Remarks

When setting the QueryText property for the KeywordQuery class, use Keyword Query Language (KQL).

See also

Reference

Query class

Query members

Microsoft.SharePoint.Client.Search.Query namespace

Other resources

Keyword Query Language (KQL) syntax reference

FAST Query Language (FQL) syntax reference