Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
sealed public class Index_PolymorphicTypeUsings : AbstractIndexCreationTask<CompoundedMedicationLot, Index_PolymorphicTypeUsings.Result> { public class Result { public string Id { get; set; } //public IEnumerable<string> Keys { get; set; } public IEnumerable<object> Values { get; set; } }
public Index_PolymorphicTypeUsings() { Map = src => from p in src let doc = AsDocument(p) let values = Recurse(doc, x => x.Values()) select new { Id = p.Id, Values = values };
Reduce = results => from result in results group result by result.Id into g select new Result { Id = g.Key, //Keys = g.First().Keys, Values = g.First().Values, }; Index(p => p.Id, FieldIndexing.Analyzed); Index(p => p.Values, FieldIndexing.Analyzed); } }