public class Services_ByAll : AbstractIndexCreationTask<Service, Services_ByAll.Result>
{
public class Result
{
public string MyFieldOne{get;set;}
public string MyFieldTwo{get;set;}
public string MyFieldThree{get;set;}
public string MyFieldFour{get;set;}
}
public Services_ByAll()
{
Map = (services) => from service in services
let arg1 = service.MyFieldOne.Split('-').Aggregate((i, j) => i + " " + j)
let arg2 = service.MyFieldThree.Split('-').Aggregate((i, j) => i + " " + j)
select new Result
{
MyFiledOne = service.MyFieldOne,
MyFieldThree =service.MyFieldThree,
MyFieldTwo = arg1,
MyFieldFour = arg2
};
//Make text fields as Analyzed, in order to enable full text search on them
Indexes.Add(entry => entry.MyFieldTwo, FieldIndexing.Analyzed);
Indexes.Add(entry => entry.MyFieldFour, FieldIndexing.Analyzed);
Analyzers.Add(x => x.MyFieldTwo, typeof(StandardAnalyzer).AssemblyQualifiedName);
Analyzers.Add(x => x.MyFieldFour, typeof(StandardAnalyzer).AssemblyQualifiedName);
}
}
15:19:14, Error, InnerExceptionMessage :: 1 :: Failed to compile index name = Services/ByAll :: ,
15:19:14, Error, InnerExceptionSource :: 1 :: :: ,
15:19:14, Error, InnerExceptionStackTrace :: 1 :: :: ,
15:19:14, Error, InnerExceptionMessage :: 2 :: Compilation Errors: Line 75, Position 9: Error CS1977 - Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.