码迷,mamicode.com
首页 > 其他好文 > 详细

NEST routing timeout scroll

时间:2019-09-22 14:35:40      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:scroll   last   summary   dex   name   employee   timeout   routing   var   

        /// <summary>
        /// PUT /employee/employee/9e5e50da-7740-488e-bee2-b24951435691?routing=test_routing 
        /// </summary>
        public void Routing()
        {
            client.Index<employee>(new employee{first_name = "chen",last_name = "rout"},x=>x.Routing("test_routing"));
        }

        public void SearchRouting()
        {
            client.Search<employee>(s=>s.Query(m=>m.MatchAll()).Routing("test_routing").Pretty());
        }

        public void TimeOut()
        {
            client.Search<employee>(s=>s.Query(q=>q.Match(m=>m.Field("last_name").Query("rout"))).Timeout("1ms"));
        }

        public void Scroll()
        {
            var scrollid = client.Search<employee>(s=>s.MatchAll().Scroll("1m").Size(1)).ScrollId;
            client.Scroll<employee>("1m",scrollid);
        }

  

NEST routing timeout scroll

标签:scroll   last   summary   dex   name   employee   timeout   routing   var   

原文地址:https://www.cnblogs.com/chenyishi/p/11567304.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!