I have an Examine search set up, and it's returning both published and unpublished pages, despite having supportUnpublished="false" in the Examine configuration.
var searcher = ExamineManager.Instance.SearchProviderCollection["WebsiteSearcher"]; var searchCriteria = searcher.CreateSearchCriteria(BooleanOperation.Or); var luceneString = composeSearchString(searchTerm, "search term"); var query = searchCriteria.RawQuery(luceneString); var searchResults = searcher.Search(query).OrderByDescending(x => x.Score);
Yet when this is executed, searchResults contains unpublished pages. The resulting links on the page just go to "#". Can anyone tell me why this is happening? I'm running Umbraco 6.2.5.
I've resolved the issue. It turned out that the unpublished page in question shared the same name as a media item. The search was returning the media item (but with a URL of "#") and I thought that it was the unpublished page. I don't want media items returned in any case so have added "File" to ExcludeNodeTypes in ExamineIndex.config and everything seems to be working now.
Unpublished pages showing up in Examine
Hi,
I have an Examine search set up, and it's returning both published and unpublished pages, despite having supportUnpublished="false" in the Examine configuration.
ExamineSettings.config:
ExamineIndex.config:
The relevant code:
Yet when this is executed, searchResults contains unpublished pages. The resulting links on the page just go to "#". Can anyone tell me why this is happening? I'm running Umbraco 6.2.5.
Thanks,
Chris
I've resolved the issue. It turned out that the unpublished page in question shared the same name as a media item. The search was returning the media item (but with a URL of "#") and I thought that it was the unpublished page. I don't want media items returned in any case so have added "File" to ExcludeNodeTypes in ExamineIndex.config and everything seems to be working now.
is working on a reply...