Try our conversational search powered by Generative AI!

Get rid of the pictures in the Find result

Vote:
 

Hi,

How to get rid of the pics from the WPi-find results list?

#177477
Apr 12, 2017 15:09
Vote:
 

How about adding a convention to not index them at all? If you don't to search for them at all on site, that's the best solution...

#177480
Apr 12, 2017 16:31
Vote:
 

Good idea, Daniel. Is thera any reason to index the picture and logo?

#177502
Apr 13, 2017 10:28
Vote:
 

Nah, normally you don't need to index images so might as well save some space in index. I normally remove them at least...

http://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2016/5/avoid-indexing-contentassetfoldermedia-images/

Another idea is to divide the images and keep all the website framework images (like logo etc) in a special folder and avoid indexing only that if you want to keep support for search general content images on your website. 

#177503
Edited, Apr 13, 2017 10:32
Vote:
 

For example, if I want to get rid of .svg files, but the folling not work. I did manual reindex.

ContentIndexer.Instance.Conventions
  .ForInstancesOf<ImageData>()
  .ShouldIndex(x => false);
#177516
Apr 13, 2017 15:44
Vote:
 

Kan fungerar med att filtera bort .svg i initializeringen i det här fallet också:

 var notAcceptedFileExtensions = new List<string>() {"svg"};

...

ContentIndexer.Instance.Conventions.ForInstancesOf<IContentMedia>().ShouldIndex(x =>
{
if (notAcceptedFileExtensions.Contains(x.SearchFileExtension().ToLowerInvariant()))
{
return false;
}
var contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();

#177730
Apr 18, 2017 9:54
Vote:
 

I would recommend to look more into my blogpost here:
http://world.episerver.com/blogs/Henrik-Fransas/Dates/2014/3/Indexing-only-referenced-files-with-EPiServer-Find-75/

#177934
Apr 24, 2017 17:08
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.