/// <summary>
        /// Fait une recherche générale dans tout les index grâce au param keyword
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="from"></param>
        /// <param name="take"></param>
        /// <returns></returns>
        public GenericResponse get(string keyword, int from = 0, int take=20)
        {
          //  var nvc = HttpUtility.ParseQueryString(Request.RequestUri.Query);
            if(keyword.Contains("%20")){
                keyword.Replace("%20", " ");
            }
            keyword = keyword.ToLower();
            GenericResponse myReturn = new GenericResponse();
            
            //Search in Profiles
            profilesController Pcontroller = new profilesController();
            myReturn.Gprofile = Pcontroller.SimpleSearchProfile(keyword, from, take).Hits;            

            //Search in Blogs
            blogController Bcontroller = new blogController();
            myReturn.Gblog = Bcontroller.SimpleSearchBlog(keyword, from, take).Hits;
            myReturn.Gblogpost = Bcontroller.SimpleSearchBlogPost(keyword, from, take).Hits;
            myReturn.Gblogpostcomment = Bcontroller.SimpleSearchBlogComment(keyword, from, take).Hits;
            
            //Search in Events
            eventsController Econtroller = new eventsController();
            myReturn.Gevent = Econtroller.SimpleSearchEvent(keyword, from, take).Hits;

            //Search in Places
            placesController PLcontroller = new placesController();
            myReturn.Gplace = PLcontroller.SimpleSearchPlace(keyword, from, take).Hits;

            //Search in Forum
            forumController Fcontroller = new forumController();
            myReturn.Gpostforum = Fcontroller.SimpleSearchPostForum(keyword, from, take).Hits;

            return myReturn;
        }
        public GenericResponse get_closeevents(double latitude = 0, double longitude = 0)
        {
            GenericResponse myReturn = new GenericResponse();

            eventsController Econtroller = new eventsController();
            myReturn.Gevent = Econtroller.searchCloseEvents(latitude, longitude).Hits;
            return myReturn;
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="from"></param>
 /// <param name="take"></param>
 /// <param name="keyword"></param>
 /// <param name="type"></param>
 /// <param name="town"></param>
 /// <param name="date"></param>
 /// <returns></returns>
 public GenericResponse get_event(int from=0, int take=20, string keyword="", string type="", string town="", DateTime? date=null)
 {
     if (keyword.Contains("%20"))
     {
         keyword.Replace("%20", " ");
     }
     keyword = keyword.ToLower();
     town = town.ToLower();
     GenericResponse myReturn = new GenericResponse();
     //Search in Forum
     eventsController Pcontroller = new eventsController();
     myReturn.Gevent = Pcontroller.AdvancedSearchEvent(from, take, keyword, type, town, date).Hits;
      
     return myReturn;
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="from"></param>
        /// <param name="take"></param>
        /// <param name="location"></param>
        /// <returns></returns>
        public GenericResponse get_place(string keyword="", int from=0, int take=20, string location="")
        {
            if (keyword.Contains("%20"))
            {
                keyword.Replace("%20", " ");
            }
            keyword = keyword.ToLower();
            location = location.ToLower();
            GenericResponse myReturn = new GenericResponse();

            //Search in Places
            placesController Pcontroller = new placesController();
            myReturn.Gplace = Pcontroller.AdvancedSearchPlace(from, take, keyword, location).Hits;
            return myReturn;
        }
        /// <summary>
        /// Non fonctionnel
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="from"></param>
        /// <param name="take"></param>
        /// <param name="author"></param>
        /// <returns></returns>
        public GenericResponse get_blog(string keyword, string from, string take, string author)
        {
            if (keyword.Contains("%20"))
            {
                keyword.Replace("%20", " ");
            }
            keyword = keyword.ToLower();
           
            blogController Pcontroller = new blogController();

            //Search in blog


            GenericResponse myReturn = new GenericResponse();
            return myReturn;

        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="from"></param>
        /// <param name="take"></param>
        /// <param name="keyword"></param>
        /// <param name="author"></param>
        /// <param name="board"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        public GenericResponse get_postforum(int from=0, int take=20, string keyword="", string author="", string board="", DateTime? date=null)
        {
            if (keyword.Contains("%20"))
            {
                keyword.Replace("%20", " ");
            }
            keyword = keyword.ToLower();

            GenericResponse myReturn = new GenericResponse();
            //Search in Profiles
            forumController Pcontroller = new forumController();
            myReturn.Gpostforum = Pcontroller.AdvancedSearchForum(from, take, keyword, author, board, date).Hits;

            return myReturn;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="from"></param>
        /// <param name="take"></param>
        /// <param name="keyword"></param>
        /// <param name="age"></param>
        /// <param name="town"></param>
        /// <returns></returns>
        public GenericResponse get_profile(int from=0, int take=20, string keyword="", int? age=null, string town="")
        {
            if (keyword.Contains("%20"))
            {
                keyword.Replace("%20", " ");
            }
            keyword = keyword.ToLower();
            town = town.ToLower();
            GenericResponse myReturn = new GenericResponse();

            //Search in Profiles
            profilesController Pcontroller = new profilesController();
            myReturn.Gprofile = Pcontroller.AdvancedSearchProfile(from, take, keyword, age, town).Hits;
             
            return myReturn;
        }