Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude 'Folder' media types from search results #11

Open
drobar opened this issue Sep 29, 2015 · 0 comments
Open

Exclude 'Folder' media types from search results #11

drobar opened this issue Sep 29, 2015 · 0 comments

Comments

@drobar
Copy link

drobar commented Sep 29, 2015

Folders have no url so they shouldn't appear in the results.

Suggested change is to add a check for the 'Folder' doctype:

var mediaPathFilter = model.RootMediaNodeId > 0
? string.Format("__IndexType:{0} +searchPath:{1} -__NodeTypeAlias:folder", UmbracoExamine.IndexTypes.Media, model.RootMediaNodeId)
: string.Format("__IndexType:{0} -__NodeTypeAlias:folder", UmbracoExamine.IndexTypes.Media);

Full discussion can be found at https://our.umbraco.org/projects/website-utilities/ezsearch/bugs-feedback-suggestions/47487-Media-folders-should-not-be-shown-in-results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant