Example #1
0
        public void NestedPropertyInfer_Test()
        {
            const string expected = "logins.loginProvider";
            var          inferrer = new Nest.Inferrer(new ConnectionSettings());
            var          actual   = inferrer.NestedProperty <ElasticUser, ElasticUserLogin>(x => x.Logins, x => x.LoginProvider);

            Assert.Equal(expected, actual);
        }
 protected virtual Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(this.GetBody());
 Routing IBulkOperation.GetRoutingForOperation(Inferrer inferrer) => this.GetRoutingForOperation(inferrer);
 Id IBulkOperation.GetIdForOperation(Inferrer inferrer) => this.GetIdForOperation(inferrer);
 protected virtual Routing GetRoutingForOperation(Inferrer inferrer) => Routing ?? new Routing(GetBody());
 protected virtual Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(GetBulkOperationBody());
Example #7
0
 public DslPrettyPrintVisitor(IConnectionSettingsValues settings)
 {
     _sb    = new StringBuilder();
     _infer = settings.Inferrer;
 }
Example #8
0
 protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(new[] { this.InferFrom, this.Upsert }.FirstOrDefault(o => o != null));
Example #9
0
 protected override Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(Self.Document);
Example #10
0
 protected override Routing GetRoutingForOperation(Inferrer inferrer) => Self.Routing ?? new Routing(Self.Document);
Example #11
0
 protected override Routing GetRoutingForOperation(Inferrer inferrer) => this.Routing ?? new Routing(this.Document);
Example #12
0
 protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(this.Document);
 internal FieldValues(Inferrer inferrer, IDictionary <string, LazyDocument> container)
     : base(container) => _inferrer = inferrer;
Example #14
0
 public FieldValues(Inferrer inferrer, IDictionary <string, object> container)
     : base(container)
 {
     _inferrer = inferrer;
 }
Example #15
0
 protected override Id GetIdForOperation(Inferrer inferrer) =>
 Self.Id ?? new Id(new[] { Self.IdFrom, Self.Upsert }.FirstOrDefault(o => o != null));