How to not index files in EPiFind?

Vote:
 

Hi,

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.


Thanks,
Mikael

#86380
May 20, 2014 15:36
Vote:
 

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

http://world.episerver.com/Blogs/Henrik-Fransas/Dates/2014/3/Indexing-only-referenced-files-with-EPiServer-Find-75/

#86393
May 20, 2014 16:50
Vote:
 

Works like a charm :-) Thanks!

/Mikael

#86410
May 21, 2014 9:38
Vote:
 

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

#86413
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.