public IHttpActionResult Search(string q, int page = 1, int pageSize = 10) { ISearchService <Post> service = new ElasticSearchService(); var results = service.Search(q, page, pageSize); return(Ok(results)); }
public ActionResult Search(ElasticSearchQuery searchQuery) { // ElasticSearchService elasticService = new ElasticSearchService(); var result = elasticService .Search(User.Identity.Name, searchQuery.RawSearch, 1, 20); return(PartialView("_SearchResult", result)); }
public bool TestEs() { var users = _es.Search <User>(); var res = _es.Delete <User>(users[0]); var user = new User { Name = "张三", Phone = "1311255454554" }; //_es.IndexDoc(user); return(true); }
public void StartFrom_AfterSearch_SetsCorrectRootId(int root) { IElasticSearchService <ComplexType> result = _service.Search <ComplexType>("").StartFrom(root); Assert.Equal(root, result.RootId); }
public IHttpActionResult Search(string q, int page = 1, int pageSize = 10) { var results = service.Search(q, page, pageSize); return(Ok(results)); }
public Microsoft.AspNetCore.Mvc.OkObjectResult Search(string keyword, int page = 1, int pageSize = 10) { var results = service.Search(keyword, page, pageSize); return(Ok(results)); }