示例#1
0
        //Do a MicroSearch
        public JsonResult DoMicroSearch(MicroSearchInputV2 query)
        {
            var totalResults         = 0;
            List <MicroProfile> data = MicroSearchServicesV2.DoMicroSearch(query, ref totalResults, ref valid, ref status);

            return(JsonHelper.GetJsonWithWrapper(data, valid, status, new { TotalResults = totalResults }));
        }
        //public ActionResult Filter( string keywords )
        //{
        //    var response = ElasticClient.Search<MainSearchResult>( body => body.Query( query => query.QueryString( qs => qs.Query( keywords ) ) ) );
        //    return Json( response.Documents, JsonRequestBehavior.AllowGet );
        //}

        //Do a MicroSearch
        public JsonResult DoMicroSearch(MicroSearchInputV2 query)
        {
            var totalResults = 0;
            var data         = MicroSearchServicesV2.DoMicroSearch(query, ref totalResults, ref valid, ref status);

            return(JsonHelper.GetJsonWithWrapper(data, valid, status, totalResults));
        }