Try our conversational search powered by Generative AI!

Convention for ignoring large files


Hi, we're using the latest version of find. How can we make a convention that ignores large files when indexing?

Nov 06, 2014 14:59

Haven't tested this, but you should be able to do something like this:

ContentIndexer.Instance.Conventions.ForInstancesOf<MediaData>().ShouldIndex(x => !x.IsWayTooBigFile());
       public static bool IsWayTooBigFile(this MediaData mediaData)
           // check file size

Nov 06, 2014 15:20

Also, you may not want to check the file size every time you try to index. Check out this forum post

Nov 06, 2014 15:22

Thanks, I had that in mind but thought that maybe there were a more elegant solution.. :) My problem is that when indexing files, the site restarts. Thought that maybe it has something to do with big files..

Nov 06, 2014 16:07


were the big files related to the site restarting?

Edited, Nov 11, 2014 11:47

Well, it does still restart. Seems to index a little more before restarting though. This is on a shared server, so it's hard to debug. :(


Log file says - which gives pretty much nothing in my eyes:

2014-11-12 11:47:35,376 [72] WARN EPiServer.Framework.Initialization.ShutdownTracker: ASP.NET shutting down due to HostingEnvironment

2014-11-12 11:47:35,641 [20] ERROR dispose: Nexus.Web.Business.Initialization.RestartModule: Application restarted because:HostingEnvironment
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
at System.Web.Hosting.PipelineRuntime.StopProcessing()
HostingEnvironment initiated shutdown
HostingEnvironment caused shutdown

Edited, Nov 12, 2014 11:50

Have you checked memory/cpu usage when indexing? 

Nov 12, 2014 12:01

So, now it seems to be solved. Updated Find to the latest version yesterday and I've managed to index the site with files. Happy days. Don't know what the problem was though.

Nov 26, 2014 12:02
* 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.