QueryResultBase.QueryTemplateWherePart Property
The QueryTemplateWherePart property of the QueryResultBase class gets or sets the WHERE clause of the query template used by Web Parts that derive from this class.
Namespace: Microsoft.SharePoint.Portal.WebControls
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Syntax
'Declaration
<WebPartStorageAttribute(Storage.Shared)> _
<BrowsableAttribute(False)> _
Public Property QueryTemplateWherePart As String
Get
Set
'Usage
Dim instance As QueryResultBase
Dim value As String
value = instance.QueryTemplateWherePart
instance.QueryTemplateWherePart = value
[WebPartStorageAttribute(Storage.Shared)]
[BrowsableAttribute(false)]
public string QueryTemplateWherePart { get; set; }
Property Value
Type: System.String
String that contains the WHERE clause of the query template used by Web Parts that derive from this class.
Remarks
Override this property to get or set default values or placeholders for the WHERE clause. For example, the SearchResults class sets this property to:
WHERE WITH ("DAV:contentclass":0,"urn:schemas.microsoft.com:fulltextqueryinfo:description":0,"urn:schemas.microsoft.com:fulltextqueryinfo:sourcegroup":0,"urn:schemas.microsoft.com:fulltextqueryinfo:cataloggroup":0,"urn:schemas-microsoft-com:office:office#Keywords":1.0,"urn:schemas-microsoft-com:office:office#Title":0.9,"DAV:displayname":0.9,"urn:schemas-microsoft-com:publishing:Category":0.8,"urn:schemas-microsoft-com:office:office#Subject":0.8,"urn:schemas-microsoft-com:office:office#Author":0.7,"urn:schemas-microsoft-com:office:office#Description":0.5,"urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName":0.2,contents:0.1,*:0.05) AS #WeightedProps
(("urn:schemas-microsoft-com:publishing:HomeBestBetKeywords"= some array ['%__keywordinput__%'] RANK BY COERCION(absolute, 999))
OR (FREETEXT("urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName", '%__keywordinput__%') RANK BY COERCION(multiply, 0.01))
OR FREETEXT(#WeightedProps, '%__keywordinput__%') )
AND (%__sourcegroups__%) %__morewhereCondition