示例#1
0
 protected IPutRoleRequest CreateFluent(string role, PutRoleDescriptor d) => d
 .Cluster("all")
 .Indices(i => i
          .Add <Project>(ii => ii
                         .Fields(f => f
                                 .Field(p => p.Name)
                                 .Field(p => p.Description)
                                 )
                         .Names(Indices <Project>())
                         .Privileges("all")
                         .Query(q => q.MatchAll())
                         )
          );
示例#2
0
 protected IPutRoleRequest UpdateFluent(string role, PutRoleDescriptor d) => d
 .RunAs("user")
 .Cluster("all")
 .Indices(i => i
          .Add <Project>(ii => ii
                         .FieldSecurity(fs => fs
                                        .Grant(f => f
                                               .Field(p => p.Name)
                                               .Field(p => p.Description)
                                               )
                                        )
                         .Names(Infer.Indices <Project>())
                         .Privileges("all")
                         .Query(q => q.MatchAll())
                         )
          );