KeywordQuery.HiddenConstraints Property (Microsoft.Office.Server.Search.Query)
Gets or sets the keyword query’s hidden constraints.

Namespace: Microsoft.Office.Server.Search.Query
Assembly: Microsoft.Office.Server.Search (in microsoft.office.server.search.dll)
Syntax

Visual Basic (Declaration)
Public Property HiddenConstraints As String
Visual Basic (Usage)
Dim instance As KeywordQuery
Dim value As String

value = instance.HiddenConstraints

instance.HiddenConstraints = value
C#
public string HiddenConstraints { get; set; }

Property Value

A string that contains the constraints.
See Also

Tags :


Community Content

SharePointHoopJumper
Setting scope or contextual scope
In the hidden constraints you can set the scope of the search.
For a normal scope it is just:
instance.HiddenConstraints = "scope:\"[Scope Name]\"";
For a contextual scope like "This Site" use:
instance.HiddenConstraints = "site:\"[url to your site]\"";

Tags : scope

Page view tracker