How to not index files in EPiFind?



I have pages of type DocumentPage in an EPi 7.5 site with EPiFind. To each page there are at least one media file, of type DocumentFile, attached in the page's "Assets folder". The problem is I want EPiFind to index only the page, not the files.

I implemented the code below, restarted the site and ran the EPiFind reindexing job. But the files are still visible in the search result.
EPiServer.EPiFind.ContentIndexer.Instance.Conventions.ForInstancesOf<DocumentPage>().IndexAttachment(x => false);

Is ContentIndexer.Instance.Conventions.ForInstancesOf<DocumentPage>()... a dead end? Should I attack the problem in this way (or another) instead? ContentIndexer.Instance.Conventions.ForInstancesOf<DocumentPage>()...

Anyone knows how this can be done? The EPiFind documentation is not really helpful in this matter.


May 20, 2014 15:36

Take a look at my blogpost about that. You find it here:

May 20, 2014 16:50

Works like a charm :-) Thanks!


May 21, 2014 9:38

Mikael. Good to know!
One thing, it does not take in count if you have pointed out images as dynamic property (see the comment in the blog) but I will fix that.

Please mark my answer as solution also, so others can see that the question is solved

May 21, 2014 10:04
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.