How will I pass parameters into this object so that I wanted to build
the "maps" string dynamically based on the paramters.
public class RavenDynamicIndex: AbstractIndexCreationTask
{
public RavenDynamicIndex()
{
}
public override IndexDefinition CreateIndexDefinition()
{
var maps = new HashSet<string>();
maps.Add(@"docs.Rolls.SelectMany(x => (x.RollIndexList),
(x, d) => new {DocumentType = d.Index.DocumentType})");
return new IndexDefinition
{
Name = "TestingDynamicIndex",
Maps = maps,
Reduce = "results.GroupBy(r => new {DocumentType =
r.DocumentType}).Select(g => new {DocumentType =
g.Key.DocumentType})"
};
}
}