private static PropertiesDescriptor<ErrorDocument> CreateMultiFieldsForAllStrings(PropertiesDescriptor<ErrorDocument> props)
 {
     var members = typeof(ErrorDocument)
         .GetProperties()
         .Where(x => x.PropertyType == typeof(string)
             && x.Name != "Id" //id field is obviously excluded
             && x.Name != "ErrorXml"//errorXML field is so long it has no indexer on it at all
             );
     foreach (var m in members)
     {
         var name = m.Name;
         name = Char.ToLowerInvariant(name[0]) + name.Substring(1);//lowercase the first character
         props
             .MultiField(mf => mf
                 .Name(name)
                 .Fields(pprops => pprops
                     .String(ps => ps.Name(name).Index(FieldIndexOption.Analyzed))
                     .String(ps => ps.Name(MultiFieldSuffix).Index(FieldIndexOption.NotAnalyzed))
                 )
             );
     }
     return props;
 }
        private static PropertiesDescriptor <ErrorDocument> CreateMultiFieldsForAllStrings(PropertiesDescriptor <ErrorDocument> props)
        {
            var members = typeof(ErrorDocument)
                          .GetProperties()
                          .Where(x => x.PropertyType == typeof(string) &&
                                 x.Name != "Id" && //id field is obviously excluded
                                 x.Name != "ErrorXml"//errorXML field is so long it has no indexer on it at all
                                 );

            foreach (var m in members)
            {
                var name = m.Name;
                name = Char.ToLowerInvariant(name[0]) + name.Substring(1);//lowercase the first character
                props
                .MultiField(mf => mf
                            .Name(name)
                            .Fields(pprops => pprops
                                    .String(ps => ps.Name(name).Index(FieldIndexOption.Analyzed))
                                    .String(ps => ps.Name(MultiFieldSuffix).Index(FieldIndexOption.NotAnalyzed))
                                    )
                            );
            }
            return(props);
        }