Пример #1
0
        public void Foo()
        {
            var elasticClient = ElasticClientFactory.ElasticClient();

            elasticClient.Index(
                new Employee
            {
                FirstName = "John",
                LastName  = "Smith",
                Age       = 25,
                About     = "I love to go rock climbing",
                Interests = new[] { "sports", "music" }
            }, d => d.Index("megacorp").Type("employee"));


            elasticClient.Get <Employee>(1);
        }
Пример #2
0
 private static ElasticClient ElasticClient()
 {
     return(ElasticClientFactory.ElasticClient());
 }