When reindexing on Sitecore 9.1, a folder with all the images is created ..\App_Data\mediaIndexing
. My problem is that it gets very big in size, > 55GB of images in my case. Has anyone encountered this problem because I couldn't find anything about this.
-
interesting! I have never seen mediaIndexing folder :)– Mahendra ShekhawatCommented Sep 24, 2019 at 17:45
1 Answer
This is done as part of the extraction of the content of media items for the _content
field. See for example Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config
where it has the type Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch
. The file mapping is done in the node at contentSearch/indexConfigurations/defaultSolrIndexConfiguration/mediaIndexing
. If you would like to disable this, you could create a patch file to remove this field. Something like:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<defaultSolrIndexConfiguration>
<documentOptions>
<fields hint="raw:AddComputedIndexField">
<field type="Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch">
<patch:delete />
</field>
</fields>
</documentOptions>
</defaultSolrIndexConfiguration>
</indexConfigurations>
</contentSearch>
</sitecore>
</configuration>
-
Only thing I would add is to be a little careful about removing
fieldName="_content"
because it is often augmented by custom computed indexers for indexing datasources for exmaple (e.g. kamsar.net/index.php/2014/05/indexing-subcontent). It might be safer to target thetype
attribute in the patch.– jammykamCommented Sep 25, 2019 at 3:09 -
Ah, good call, didn't realize people were doing that. Not sure I like the idea of adding multiple entries for
_content
, but if people are doing it, so be it. Commented Sep 25, 2019 at 3:34 -
That field is used internally and already has indexed data added to it, so it is not uncommon to further augment that data: sitecore.stackexchange.com/questions/8609/…– jammykamCommented Sep 25, 2019 at 14:30
-
Thank you @MatthewFitzGerald-Chamberlain. Yes, I had to change the fieldName (_content) with type (Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch) and it worked.– IvanaCommented Sep 25, 2019 at 15:43
-
1@Ivana That's great. If you don't mind, please go ahead and accept this answer if it solved your problem. :) Commented Sep 25, 2019 at 16:11