Sitecore Media Framework Ooyala Edition module with Solr search

Recently I was configuring a Sitecore 8 solution (rev. 150621) to use Solr as its indexing provider, instead of Lucene. I'd also set up the solution to use the Sitecore Media Framework Ooyala Edition module (FYI, Ooyala is an online video services provider - the module enables content editors to 'import' videos, and then embed them into their pages using, for instance, the Rich Text Editor or the provided MVC controller) - the version we are using is 2.1 rev. 150323. The module comes with its own index - and a Lucene one at that (defined in the supplied file Sitecore.ContentSearch.MediaFramework.Ooyala.config) - which I had to disable as part of the Solr setup work.

Unfortunately, removing this index causes some of the module to start misbehaving - for instead, if you run an "Import" from the "Media Framework" tab, not a great deal happens except for some messages similar to the following being written to your logs:

    Exception: System.ArgumentException
    Message: Index mediaframework_ooyala_index was not found
    Source: Sitecore.ContentSearch
        at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)
        at Sitecore.Integration.Common.Utils.ContentSearchUtil.FindOne[T](String indexName, Expression`1 filter)
        at Sitecore.MediaFramework.Ooyala.Synchronize.AssetSynchronizer.GetSearchResult(Object entity, Item accountItem)
        at Sitecore.MediaFramework.Pipelines.MediaSyncImport.MediaSyncItemImport.IndexSearch.Process(MediaSyncItemImportArgs args)
        at (Object , Object[] )
        at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
        at Sitecore.MediaFramework.Synchronize.SynchronizerBase.SyncItem(Object entity, Item accountItem)
        at Sitecore.MediaFramework.Pipelines.MediaSyncImport.CallItemImport.SyncEntity(Object entity, Item accountItem)
    

Luckily Sitecore support provided me with a Solr version of the index definition as shown below, which seems to sort things out:

    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
      <sitecore>
        <contentSearch>
          <configuration>
            <indexes>
              <index id="mediaframework_ooyala_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider" patch:before="index[1]">
                <param desc="name">$(id)</param>
                <param desc="core">$(id)</param>
                <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
                <strategies hint="list:AddStrategy">
                  <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
                </strategies>
                <commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch">
                  <policies hint="list:AddCommitPolicy">
                    <policy type="Sitecore.ContentSearch.TimeIntervalCommitPolicy, Sitecore.ContentSearch" />
                  </policies>
                </commitPolicyExecutor>
                <locations hint="list:AddCrawler">
                  <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
                    <Database>master</Database>
                    <Root>/sitecore/media library/Media Framework</Root>
                  </crawler>
                </locations>
                <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration">
                  <IndexAllFields>true</IndexAllFields>
                  <fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">
                    <fieldNames hint="raw:AddFieldByFieldName">
                      <fieldType fieldName="id"         returnType="string" />
                      <fieldType fieldName="parentid"         returnType="string" />
                      <fieldType fieldName="name"         returnType="string" />
                      <fieldType fieldName="description"         returnType="string" />
                      <fieldType fieldName="fullname"         returnType="string" />
                      <fieldType fieldName="preview"         returnType="string" />
                      <fieldType fieldName="updatedat"         returnType="string" />
                      <fieldType fieldName="createdat"         returnType="string" />
                      <fieldType fieldName="status"         returnType="string" />
                      <fieldType fieldName="duration"         returnType="string" />
                      <fieldType fieldName="adsetid"         returnType="string" />
                      <fieldType fieldName="previewimageurl"         returnType="string" />
                      <fieldType fieldName="originalfilename"         returnType="string" />
                      <fieldType fieldName="playstrailingweek"         returnType="string" />
                      <fieldType fieldName="filtertags"         returnType="string" />
                      <fieldType fieldName="taginclusion"         returnType="string" />
                      <fieldType fieldName="playlisttype"         returnType="string" />
                      <fieldType fieldName="thumbnailoverride"         returnType="string" />
                      <fieldType fieldName="videoids"         returnType="string" />
                      <fieldType fieldName="accountid"         returnType="string" />
                      <fieldType fieldName="accentcolor"         returnType="string" />
                      <fieldType fieldName="showsharebutton"         returnType="string" />
                      <fieldType fieldName="showinfoscreenhomepagelink"         returnType="string" />
                      <fieldType fieldName="twittersharing"         returnType="string" />
                      <fieldType fieldName="showadcountdown"         returnType="string" />
                      <fieldType fieldName="showinfoscreentitle"         returnType="string" />
                      <fieldType fieldName="showinfobutton"         returnType="string" />
                      <fieldType fieldName="urlsharing"         returnType="string" />
                      <fieldType fieldName="facebooksharing"         returnType="string" />
                      <fieldType fieldName="emailsharing"         returnType="string" />
                      <fieldType fieldName="showinfoscreendescription"         returnType="string" />
                      <fieldType fieldName="showbitratebutton"         returnType="string" />
                      <fieldType fieldName="diggsharing"         returnType="string" />
                      <fieldType fieldName="showembedbutton"         returnType="string" />
                      <fieldType fieldName="showchannelbutton"         returnType="string" />
                      <fieldType fieldName="showendscreenreplaybutton"         returnType="string" />
                      <fieldType fieldName="enableerrorscreen"         returnType="string" />
                      <fieldType fieldName="showvolumebutton"         returnType="string" />
                      <fieldType fieldName="chromeless"         returnType="string" />
                      <fieldType fieldName="alwaysshow"         returnType="string" />
                      <fieldType fieldName="scrubberimageurl"         returnType="string" />
                      <fieldType fieldName="bufferonpause"         returnType="string" />
                      <fieldType fieldName="watermarkimageurl"         returnType="string" />
                      <fieldType fieldName="clickurl"         returnType="string" />
                      <fieldType fieldName="alpha"         returnType="string" />
                    </fieldNames>
                    <fieldTypes hint="raw:AddFieldByFieldTypeName">
                      <fieldType fieldTypeName="checkbox|readonlycheckbox" returnType="bool" />
                    </fieldTypes>
                  </fieldMap>
                  <fields hint="raw:AddComputedIndexField">
                    <field fieldName="label_parentid" returnType="string">Sitecore.MediaFramework.Ooyala.Indexing.ComputedFields.LabelParentId,Sitecore.MediaFramework.Ooyala</field>				        
                  </fields>
                </configuration>
              </index>
            </indexes>
          </configuration>
        </contentSearch>
      </sitecore>
    </configuration>

 


By James at 17 Aug 2015, 21:34 PM


Comments

Post a comment