Is there a way to designate assets not to be included in search results?

Dustin B. 5 years ago in BLOX CMS updated by Maureen Reinert 4 years ago 7

It seems silly to have all assets be displayed on the search results list, especially if some are just images (and especially if some of those images have funny/incomplete titles). Also, we create some assets specifically for our e-mail newsletter, and those are not to be displayed anywhere else on our website, except in the newsletter, and those are showing up in the search results as well.

There must be some way to designate an asset to not be "searchable". Please advise. Thank you!

Sounds like the new BLOX Media Library might be exactly what you're looking for in regards to those e-mail newsletter specific images.


Right now we're using FTP access to the App directory on the site to upload static images like those.

You can add noindex meta tag to the <head> with 

[% if cms.asset.type == 'image'; %]

<!--this is an image asset-->

<meta name="robots" content="noindex">

[% end; %]

If you are talking about limiting the site search results to just things like articles, collections, video and audio, we did that by creating a custom block for the nav that modifies the search URL to look for just those types of assets. I'd be happy to share what we did with you. The user can still search for the other things, but at least when the user starts the search it doesn't include things like images.

Hi Maureen,

Yes, I think that's what we need as well. I would be interested in learning what you did to set that up. Thank you!

Probably the easiest thing to do that doesn't require any custom blocks or work is to change the URL in the standard search block -- no custom work required.

If you change the URL to /search/?t=article%2Clink%2Ccollection%2Cvideo%2Cyoutube%2Caudio, then the user's results will be limited to those types of assets. (You could also limit the initial results to particular sections using the same URL parameters that you would use to create an RSS feed https://help.bloxcms.com/knowledge-base/applications/editorial/assets/faq/article_504ccd62-2bfd-11e5-8804-131eebdc4425.html#url_parameters)

When you get to the search results page, you'll see that those types are checked in the expanded search box.

The exception is appears to be audio. If you want audio included then you need to some template work to get that type selected based on the URL parameters. It will be used for the initial search, but after that it wouldn't be. The same is true if you wanted to continue to limit the section to a particular one. We do that for searches in our VisitLancaster section https://lancasteronline.com/visitlancaster/search/?c%5B%5D=visitlancaster*&q=a&sd=desc&l=10&t=article%2Clink%2Ccollection%2Cvideo%2Cyoutube%2Caudio&nsa=eedition, because we want to try to limit users as much as possible to justVisitLancaster content when they're using that part of the site.

Another place that we use a search block that attempts to limit the results the user sees is our https://lancasteronline.com/photos/ page. There we are trying to limit the user to just images in the results. We direct people to this page when they are trying to find a photo for purchase. 

If article, collection and video is enough for your search results, then there's no template work needed. If you want to limit the search more than that, then you'll need someone who can modify templates. I can help with that, but it's more involved.

Everything that's being discussed doesn't address the request of the O)riginal P)oster.

They are asking for the ability to exclude certain BLOX assets from the front end search system... In BLOX. 

They are NOT talking about external search engines (Google,etc) 

The said:

> There must be some way to designate an asset to not be "searchable". Please advise. Thank you!

There isn't... And there should be.

Actually that is what my response is about. It's not a way to designate assets as not searchable but it is way to limit the user's exposure to them.

I agree it would be nice to have a way to flag assets as to keep them out of the search results, but until that happens there are ways to limit their presentation.