6

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.

1
  • interesting! I have never seen mediaIndexing folder :) Commented Sep 24, 2019 at 17:45

1 Answer 1

4

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>
6
  • 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 the type attribute in the patch.
    – jammykam
    Commented 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/…
    – jammykam
    Commented 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.
    – Ivana
    Commented 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.