DAM for Optimizely works well with Optimizely Find. To get the most out of it you might want to even add the individual assets to the index. This can be done by adding a ReindexInformation provider as shown below.
...
language | c# |
---|---|
title | ReindexInformation Provider |
...
using Digizuite.Models;
using Digizuite.Optimizely;
using EPiServer.Find.Cms;
using EPiServer.ServiceLocation;
using EPiServer.Web;
using System.Globalization;
namespace AlloyDevSiteNet6.Business
{
[ServiceConfiguration(typeof(IReindexInformation),
...
Lifecycle
...
=
...
ServiceInstanceScope.Singleton)]
...
public
...
class
...
DigizuiteReindexInformation
...
:
...
IReindexInformation
...
{
public IDigizuiteClient Client { get; set; }
public DigizuiteReindexInformation(IDigizuiteClient client)
{
this.Client = client;
}
public IEnumerable<ReindexTarget> ReindexTargets
{
get
{
var languages = Client.Languages.Select(lang
...
=>
...
new
...
CultureInfo(lang.
...
LanguageCode)).ToList();
...
var facets = new List<FacetRequest>()
{
new FacetRequest()
{
FacetMode = FacetMode.QueryOnly,
Recursive = true,
SearchKey = "assetType",
Values = new List<string>{"image"}
}
};
var assets = Client.FindGetAll(facets).GetAwaiter().GetResult();
return new List<ReindexTarget>()
{
new ReindexTarget
{
ContentLinks = assets,
Languages = languages,
SiteDefinition = SiteDefinition.Empty
}
};
}
}
public ContentReference Root
{
get
{
return DigizuiteContentProvider.GetEntryPoint();
}
}
}
}