I am using SearchDataSource in CMS 6 to do a database content search on the site. It returns result for the title and heading of the page but If I search for other properties on the page it does not return any results. Do I need to run an indexing service manually to make the search work or am I missing some configuration.
The code I am using for search is
<EPiServer:SearchDataSource ID="SearchDataSourceCtrl" runat="server" EnableVisibleInMenu="false"></EPiServer:SearchDataSource>
SearchDataSourceCtrl.PageLink = PageReference.RootPage; SearchDataSourceCtrl.IncludeRootPage = true; SearchDataSourceCtrl.SearchFiles = true; SearchDataSourceCtrl.SearchLocations = "~/Global/,~/Documents/,~/PageFiles/"; SearchDataSourceCtrl.SearchQuery = Criteria; SearchDataSourceCtrl.OnlyWholeWords = false; SearchDataSourceCtrl.DataBind();
The tree branches on my CMS starts from the root page rather than the start page hence I am using RootPage in the page link.
Also I have multiple language enabled and I have tried setting the LanguageBraches property on the SearchDataSourceCtrl.
The properties you're trying to search for, are they set to be searchable? (go to edit the page type and property and make sure the "Searchable property" checkbox is checked).
Thanks the property was not set to searchable. I have set it to be searcable but still I am not getting the results on that property. Any other suggestions?
You probably need to republish the pages that use that property.
Thanks Frederik you are a star. It is working now.
No problem, glad it helped :).