We have dynamic property "SectionName" set for pages. We want to filter search results by this property. It is added to the PageSearch as a criteria as follows
Dim crit As PropertyCriteria = New PropertyCriteria
crit.StringCondition = Filters.StringCompareMethod.Contained
crit.Type = PropertyDataType.String
crit.Name = "SectionName"
crit.Value = "main"
crit.Required = True
PageSearch1.Criterias.Add(crit)
PageSearch1.SearchQuery = "search string"
PageSearch1.DataBind()
The search results take no account of the criteria. The search above returns pages with "SectionName" property set to "tools" or "articles" as well as "main". It appears that the criteria is ignored in the search results. How should search criteria be used in the PageSearch control
Dim crit As PropertyCriteria = New PropertyCriteria crit.StringCondition = Filters.StringCompareMethod.Contained crit.Type = PropertyDataType.String crit.Name = "SectionName" crit.Value = "main" crit.Required = True PageSearch1.Criterias.Add(crit) PageSearch1.SearchQuery = "search string" PageSearch1.DataBind()
The search results take no account of the criteria. The search above returns pages with "SectionName" property set to "tools" or "articles" as well as "main". It appears that the criteria is ignored in the search results. How should search criteria be used in the PageSearch control