NEST routing timeout scroll

        /// <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);
        }

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章