예제 #1
0
 public static void PutUserItem(UsersItem item)
 {
     try
     {
         Utils.search_db.Table <UsersItem>().Save(item);
     }
     catch (Exception e)
     {
         Log.LogInfo(e.Message, e, "error while putting to search index");
     }
 }
예제 #2
0
 public static void PutUserItem(UsersItem item)
 {
     try
     {
         JavaScriptSerializer ser = new JavaScriptSerializer();
         ser.MaxJsonLength = Int32.MaxValue;
         string data = ser.Serialize(item);
         using (var client = new WebClient())
         {
             client.Encoding = Encoding.UTF8;
             client.UploadString(TopSecret.ElasticUrl + item.UserId + "/" + item.ID, "PUT", data);
         }
     }
     catch (Exception e)
     {
         Log.LogInfo(e.Message, "error while putting to search index");
     }
 }
예제 #3
0
 public static void PutUserItem(UsersItem item)
 {
     try
     {
         Utils.search_db.Table<UsersItem>().Save(item);
     }
     catch (Exception e)
     {
         Log.LogInfo(e.Message, e, "error while putting to search index");
     }
 }