November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Others might have better ideas, but off the top of my head...
I think you'd need to exclude them with critieria. Create a boolean property called "Exclude from Search" (or use the existing "Exclude from Menus") and add a criteria element to only match on those where this isn't checked.
For files, move the non-searchable files to a separate VPP and don't include it in the SearchLocations property.
Hi, thanks for the reply
All my pages are of diffrent type and so i have to create creteria for all the pages .How do I map this creteria with my search?
You'll need to create that same property (named the same) on each Page Type, yes. Then, do something like this:
<EPiServer:SearchDataSource PageLink="<%# PageReference.StartPage %>" runat="server">
<Criteria>
<EPiServer:PropertyCriteriaControl Condition="Equal" Type="Boolean" Name="ExcludeFromSearch" Value="False" Required="true" runat="server" />
</Criteria>
</EPiServer:SearchDataSource>
I also just noticed that the SearchDataSource has a property called "EnableVisibleInMenu". You could use this to exclude pages where "Show in Menus" is not checked. That might be an easy way to filter out non-searchable pages.
hi,
I have creted a property in my page type "selected/not selected" with same name. Now when i am searching any text in my text box nothing is showing up in my search.
Replace Value
=
"False"
with IsNull
=
"True".
And use a Dynamic Property instead of one for each page.
BR Jens
You could also use something like this
// Exclude the following page types
foreach (PageType pageType in Constants.ExcludedPageTypes.Search)
{
FilterCompareTo pageTypeComparer = new FilterCompareTo("PageTypeID", pageType.ID.ToString())
{Condition = CompareCondition.NotEqual};
pageTypeComparer.Filter(e.Pages);
}
// Remove all pages that are set to be hidden from the search
new FilterCompareTo("HideFromSearch", null).Filter(e.Pages);
The above will filter out pages depending on properties also a set number of pagetypes you do not want to show
I just created a FilterMethod and passed this into the SearchDataSource :
searchDataSource.Filter += FilterSearchResults;
Hi,
I have a content Search in my code. But my certain Page Types are like System pages just for display of results. The only diffrenec in my code between other pages and system pages are that the file name in create page type is under the system folder in my code. How do I exclude them from search.??